itamarst / eliot

Eliot: the logging system that tells you *why* it happened
https://eliot.readthedocs.io
Apache License 2.0
1.1k stars 66 forks source link

Intermittent failure from test_omitLoggerFromActionType in 1.7.0 #436

Open exarkun opened 4 years ago

exarkun commented 4 years ago

Seen on my CI:

FAIL: test_omitLoggerFromActionType (eliot.tests.test_validation.EndToEndValidationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python2.7-eliot-1.7.0.drv-0/eliot-1.7.0/eliot/tests/test_validation.py", line 895, in test_omitLoggerFromActionType
    self.assertEqual(messages[0]["key"], 123)
AssertionError: 5 != 123

This is a somewhat older version so perhaps the problem has been fixed already. I couldn't find any tickets that seemed related, though.

itamarst commented 4 years ago

Hm. Will take a look.

itamarst commented 4 years ago

Are you running that on Python 3 too? If so, does it fail there?

exarkun commented 4 years ago

Alas, I'm only running on Python 2 on CI.

itamarst commented 4 years ago

Since I've never seen that on recent runs (Python 3.5+), I hypothesize it's something about dictionary order stability, but would need to read actual code to be sure.

exarkun commented 4 years ago

It looks like another test fails similarly:

======================================================================
FAIL: test_logCallsDefaultLoggerWrite (eliot.tests.test_validation.MessageTypeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python2.7-eliot-1.7.0.drv-0/eliot-1.7.0/eliot/tests/test_validation.py", line 533, in test_logCallsDefaultLoggerWrite
    self.assertEqual(messages[0][u"key"], 1234)
AssertionError: 5 != 1234
exarkun commented 4 years ago

Here's another one :/

ERROR: test_global_cleanup (eliot.tests.test_testing.CaptureLoggingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nix-build-python2.7-eliot-1.7.0.drv-0/eliot-1.7.0/eliot/tests/test_testing.py", line 662, in test_global_cleanup
    self.assertEqual(messages[0][u"some_key"], 1234)
KeyError: u'some_key'

every time I mark another one as skipped, another pops up.