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

Intermittent test failure #62

Closed
dblock opened this issue Sep 18, 2014 · 1 comment
Closed

Intermittent test failure #62

dblock opened this issue Sep 18, 2014 · 1 comment

Comments

@dblock
Copy link
Collaborator

dblock commented Sep 18, 2014

  Scenario: Send JSON data
    ✔  Given I use the default hyperclient config     # features/steps/default_config.rb:4
    ✔  When I send some data to the API               # features/steps/default_config.rb:12
    !  Then it should have been encoded as JSON       # features/steps/default_config.rb:17

        The request POST http://api.example.org/posts with body "{\"title\":\"My first blog post\"}" was expected to execute 1 time but it executed 0 times

        The following requests were made:

        GET http://api.example.org/ with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.9.0'} was made 1 time

        ============================================================
        /Users/dblock/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/gems/2.0.0/gems/webmock-1.18.0/lib/webmock/assertion_failure.rb:7:in `failure'

  Scenario: Parse JSON data
    ✔  Given I use the default hyperclient config     # features/steps/default_config.rb:4
    ✔  When I get some data from the API              # features/steps/default_config.rb:21
    ✔  Then it should have been parsed as JSON        # features/steps/default_config.rb:25

Error summary:
  Errors (1)
    Default config :: Send JSON data :: Then it should have been encoded as JSON

This is intermittent, 3 out of 10 runs. Looks suspicious.

@dblock
Copy link
Collaborator Author

dblock commented Sep 20, 2014

I "fixed" it in #61, it seemed like doing another explicit expectation for an HTTP request worked more reliably, I am not sure why.

@dblock dblock closed this as completed Sep 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant