16791: Fixes audit log cleaning tests.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Fri, 18 Sep 2020 20:18:57 +0000 (17:18 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Fri, 18 Sep 2020 20:18:57 +0000 (17:18 -0300)
commit8503c026e63af2f396e82194e4ba24f1b49c1482
treefac2114199f689f8773cc3adf2120b618b50a3ca
parent73f5326abbb4a7aa706e24382f742d6afc712172
16791: Fixes audit log cleaning tests.

Log fixtures lacking the created_at field set in the past in combination
with incorrect testing made us believe the LogTest was working ok.
Specifically, LogTest#test_delete_old_audit_logs_in_thread was not doing
the waiting for the log entries to be eliminated, so there was a race
between the AuditLogs thread cleaning the records and the test teardown doing
the rollback producing the intermittent failure of
use_ownership_and_permission_links_to_determine_which_logs_a_user_can_see.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>
services/api/test/fixtures/logs.yml
services/api/test/unit/log_test.rb