Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make usage of the new stop semantics to properly shutdown the plugin #10

Closed
wants to merge 1 commit into from
Closed

Make usage of the new stop semantics to properly shutdown the plugin #10

wants to merge 1 commit into from

Conversation

purbon
Copy link

@purbon purbon commented Sep 15, 2015

Implements stop to return from run according to elastic/logstash#3210

Depends on elastic/logstash-devutils#32 and elastic/logstash#3812

Fixes #9

@purbon
Copy link
Author

purbon commented Sep 15, 2015

Not sure why, but sometimes (looks like randomly) rspec hangs after finishing all the work. looks something like:
screen shot 2015-09-15 at 12 15 24

most of the times runs without issues. Looks like some issue with my zeromq install, but would be nice to validate.

@talevy
Copy link
Contributor

talevy commented Sep 15, 2015

code looks good. is leaving teardown acceptable? or did we rename this completely to close

I will attempt to re-run on my box and let you know how that goes!

@purbon
Copy link
Author

purbon commented Sep 16, 2015

@talevy teardown got renamed to close everywhere.

@purbon
Copy link
Author

purbon commented Sep 16, 2015

I run this several times and with the last commit the specs are not hanging anymore.

@jsvd
Copy link
Member

jsvd commented Sep 21, 2015

@purbon since this is marked as kind of integration test, what do I need to set up in order to test this?

@purbon
Copy link
Author

purbon commented Sep 21, 2015

@jsvd a working libzmq installation.

@jsvd
Copy link
Member

jsvd commented Sep 21, 2015

hum.. I just ran

bundle exec rspec -e interru
Using Accessor#strict_set for specs
Run options:
  include {:full_description=>/interru/}
  exclude {:zeromq=>true, :integration=>true, :redis=>true, :socket=>true, :performance=>true, :couchdb=>true, :elasticsearch=>true, :elasticsearch_secure=>true, :export_cypher=>true, :windows=>true}
.

Finished in 0.551 seconds (files took 3.11 seconds to load)
1 example, 0 failures

Randomized with seed 38819

@purbon
Copy link
Author

purbon commented Sep 21, 2015

@jsvd don't know why this happen:

purbon-elastic% bundle exec rspec           
Using Accessor#strict_set for specs
Run options: exclude {:zeromq=>true, :integration=>true, :redis=>true, :socket=>true, :performance=>true, :couchdb=>true, :elasticsearch=>true, :elasticsearch_secure=>true, :export_cypher=>true, :windows=>true}

All examples were filtered out


Finished in 0.001 seconds (files took 1.77 seconds to load)
0 examples, 0 failures

Randomized with seed 39650

for example.

@jsvd
Copy link
Member

jsvd commented Sep 21, 2015

by giving -e it ignores the tags
the thing is..should the test pass even without a zmq instance running?

@purbon
Copy link
Author

purbon commented Sep 22, 2015

@jsvd without libzmq present in your system test fail, please check if libzmq is there from former times 👍

@jsvd
Copy link
Member

jsvd commented Sep 22, 2015

LGTM

move context to be lazy initialized and out of kind of const as its not

fix the hanging specs by closing the input loop
@elasticsearch-bot
Copy link

Merged sucessfully into master!

@purbon purbon closed this in 4876e7c Sep 23, 2015
@purbon purbon deleted the feature/use_stop_method branch September 23, 2015 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants