You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: ovsdb-idl: Fix flaky insert and delete tests.
The weak reference test sends two transactions and then waits for an
update and sends a third transaction. First transaction adds a row
and the second one deletes it. The test relies on an IDL run between
the second and the third transactions to receive and process updates
from both previous transactions, and that is not guaranteed. This
is causing frequent test failures in CI.
If the server is slow to send an update for the second transaction,
the IDL run will return without receiving it and the test application
has no way to know that it needs to wait for one more update. The
change sequence number doesn't have a meaning other than it changes
on updates, so we can't rely on it to wait for two updates.
The strong reference test has somewhat similar issue, it sends two
transactions and then expects both updates to be received together.
And that is, again, not guaranteed. However, the difference here is
that the issue (crash) that it tries to reproduce requires both
updates to be received within the same IDL run, which was not a hard
requirement for the weak reference test. The weak reference test
tolerates receiving updates in two separate IDL runs, so we could have
fixed it by waiting for an update after the first transaction without
clearing the tracking and then waiting again after the second. But
such approach would not work for the strong reference test. And there
is actually no way for us to ensure that both updates will be received
within the same IDL run. Best we can do is to sleep for some time
hoping that it's enough for both updates to be queued up. So, let's
do that. Tests are very simple and fast, so sleeping for 1 second
should be enough.
'refs to link[12]' tests are similar to a strong reference test in
terms that they require changes to be processed within the same
IDL run.
Fixes: 02f31a1 ("ovsdb-idl: Preserve references for rows deleted in same IDL run as their insertion.")
Fixes: 91e1ff5 ("ovsdb-idl: Don't reparse orphaned rows.")
Fixes: 4102674 ("ovsdb-idl: Preserve change_seqno when deleting rows.")
Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
0 commit comments