hammer icon indicating copy to clipboard operation
hammer copied to clipboard

Occasional test failures

Open JuneKelly opened this issue 6 years ago • 0 comments

Run for _n in {1..1000}; do make test; done for a while, and sometimes tests will fail with:

mix format mix.exs "lib/**/*.{ex,exs}" "test/**/*.{ex,exs}"
mix test --no-start
........

  1) test make_rate_checker (HammerTest)
     test/hammer_test.exs:18
     match (=) failed
     code:  assert {:deny, 2} = check.("aaa")
     right: {:error, %ArgumentError{message: "argument error"}}
     stacktrace:
       test/hammer_test.exs:22: (test)

......

Finished in 1.4 seconds
15 tests, 1 failure

Randomized with seed 326640

and

  1) test returns expected tuples on delete_buckets (HammerTest)
     test/hammer_test.exs:70
     match (=) failed
     code:  assert {:allow, 1} = Hammer.check_rate("my-bucket1", 1000, 2)
     right: {:deny, 2}
     stacktrace:
       test/hammer_test.exs:71: (test)

and

  1) test returns expected tuples on inspect_bucket (HammerTest)
     test/hammer_test.exs:58
     match (=) failed
     code:  assert {:deny, 2} = Hammer.check_rate("my-bucket1", 1000, 2)
     right: {:allow, 1}
     stacktrace:
       test/hammer_test.exs:65: (test)

............

Finished in 1.3 seconds
15 tests, 1 failure

JuneKelly avatar May 31 '18 21:05 JuneKelly