mirror of
https://github.com/google/nomulus.git
synced 2025-07-04 02:03:24 +02:00
Attempt to fix flakey deleteExpiredDomain test (#1022)
* Attempt to fix flakey deleteExpiredDomain test Though hard to reproduce locally, the test_deletesThreeDomainsInOneRun test has failed multiple times on Kokoro. The root cause may be the non-transactional query executed by the Action object, which was by design. Observing that the other test never fails, this PR follows its behavior and adds a transactional query before invoking the action.
This commit is contained in:
parent
ccfa145ab7
commit
89fe53e339
1 changed files with 3 additions and 0 deletions
|
@ -126,6 +126,9 @@ class DeleteExpiredDomainsActionTest {
|
|||
DomainBase domain2 = persistNonAutorenewingDomain("veee2.tld");
|
||||
DomainBase domain3 = persistNonAutorenewingDomain("tarm3.tld");
|
||||
|
||||
// action.run() executes a non-transactional query by design but makes this test flaky.
|
||||
// Executing a transaction here seems to force the test Datastore to become up to date.
|
||||
assertThat(tm().loadByEntity(domain3).getStatusValues()).doesNotContain(PENDING_DELETE);
|
||||
action.run();
|
||||
|
||||
assertThat(tm().loadByEntity(domain1).getStatusValues()).contains(PENDING_DELETE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue