- Issue created by @acbramley
- π¦πΊAustralia mstrelan
// Test that logged in user does not get logged out in maintenance mode // when hitting jsonapi route. $this->container->get('state')->set('system.maintenance_mode', FALSE); $this->drupalLogin($this->userCanViewProfiles); $this->container->get('state')->set('system.maintenance_mode', TRUE); $this->drupalGet('/jsonapi/taxonomy_term/tags'); $this->assertSession()->statusCodeEquals(503);
Sounds like state cache race condition. Probably needs
WaitTerminateTestTrait
. - Merge request !11638Repeat test 1000 times, with WaitTerminateTestTrait β (Open) created by mstrelan
- π¦πΊAustralia mstrelan
Repeat 1000 times:
Run 1 - 7/1000 fails
Run 2 - 14/1000 fails
Run 3 - 10/1000 failsWith WaitTerminateTestTrait:
Run 1 - 2/1000 fails
Run 2 (after moving setWaitForTerminate) - 0/1000 fails
Run 3 - 0/1000 fails - π¦πΊAustralia mstrelan
mstrelan β changed the visibility of the branch 3515404-repeat to hidden.
- π¦πΊAustralia mstrelan
mstrelan β changed the visibility of the branch 3515404-repeat-fix to hidden.
- π¦πΊAustralia mstrelan
I forgot to actually commit the code for Run 1 with WaitTerminateTestTrait, which is why it had 2 fails. I've moved the
setWaitForTerminate
call where I intended it to be the first time and ran it again:Run 4 - 0 fails
I've hidden the 2 test branches and opened a new branch (MR !11640) with only the fix. This is ready for review.
- π¦πΊAustralia acbramley
Makes sense, test is specifically testing maint mode which requires state and that requires the wait trait.
I wonder if there's an easy way to find tests using state that aren't using the wait trait yet π€
-
larowlan β
committed fc8a2834 on 11.x
Issue #3515404 by mstrelan, acbramley: [random test failure]...
-
larowlan β
committed fc8a2834 on 11.x