-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
I believe the occasional failure is timing based.
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="irods.test.test_audit_plugin.TestAuditPlugin-20250515133032" tests="1" file="irods/test/test_audit_plugin.py" time="59.209" timestamp="2025-05-15T13:31:31" failures="1" errors="0" skipped="0">
<testcase classname="irods.test.test_audit_plugin.TestAuditPlugin" name="test_audit_plugin" time="59.209" timestamp="2025-05-15T13:31:31" file="scripts/irods/test/test_audit_plugin.py" line="46">
<failure type="AssertionError" message="'failed' != 'passed'
- failed
+ passed
"><![CDATA[Traceback (most recent call last):
File "/var/lib/irods/scripts/irods/test/test_audit_plugin.py", line 70, in test_audit_plugin
self.assertEqual(result, 'passed')
AssertionError: 'failed' != 'passed'
- failed
+ passed
]]></failure>The assertion on L70 is where the test fails.
irods_rule_engine_plugin_audit_amqp/packaging/test_audit_plugin.py
Lines 65 to 70 in 663d458
| print("result queue size is ", result_queue.qsize()) | |
| self.assertEqual(0, pid_queue.qsize(), "the joinable queue pid_queue should be empty") | |
| self.assertTrue(1 <= result_queue.qsize(), "the result queue size should at least be one") | |
| for i in range(result_queue.qsize()): | |
| result = result_queue.get() | |
| self.assertEqual(result, 'passed') |
Notice the comment attached to the assertion on L67. That assertion is communicating that the test only needs a non-empty queue. If that's the intention, then the test should pass as long as one instance of passed exists in the queue. It's possible that the server is shut down before the test can produce a state which leads to success.