loculus-project / loculus

An open-source software package to power microbial genomic databases
https://loculus.org
GNU Affero General Public License v3.0
34 stars 1 forks source link

Flaky backend test: `DeleteSequencesEndpointTest > WHEN superuser deletes entries of other user THEN is successfully deleted() FAILED` #2708

Closed corneliusroemer closed 2 weeks ago

corneliusroemer commented 2 weeks ago

It sometimes fails, sometimes doesn't, strange. Maybe race condition in test?

> Task :test

DeleteSequencesEndpointTest > WHEN superuser deletes entries of other user THEN is successfully deleted() FAILED
    java.lang.AssertionError: JSON path "$[0].accession" expected:<LOC_000001Y> but was:<LOC_00000AE>
        at org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:59)
        at org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:122)
        at org.springframework.test.util.JsonPathExpectationsHelper.assertValue(JsonPathExpectationsHelper.java:123)
        at org.springframework.test.web.servlet.result.JsonPathResultMatchers.lambda$value$2(JsonPathResultMatchers.java:111)
        at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:214)
        at org.loculus.backend.controller.submission.DeleteSequencesEndpointTest.WHEN superuser deletes entries of other user THEN is successfully deleted(DeleteSequencesEndpointTest.kt:308)
corneliusroemer commented 2 weeks ago

No this is not caused by parallelism, this happens without parallelism, before I started adding it.

corneliusroemer commented 2 weeks ago

Closing as I can't reproduce right now - so maybe fixed/related to #2710 - will reopen if I see it again.