Stop MO tests have been failing erratically.
They have been failing even before changing the ChannelBroker to use the Respondent.with_lock mutex. This is an evidence of that
Discovery
The tests were not filtering by respondent_id, so they could be using another records than the intended ones for the assertions.
The tests were using plain Repo.one! for fetching Respondent, SurveyLogEntry and RespondentDispositionHistory models. The thing is that Mix runs tests of different modules in parallel and other tests insert records in those tables, so there is no guarantee from the stop mo tests that they will be testing the same respondent activity throughout the test
Observations
I could not replicate the failures locally, so I actually have no guarantee that these changes fix them. However I find this a plausible cause of the failures
Leaving here some other examples of the failures in GHA
Context
Stop MO tests have been failing erratically. They have been failing even before changing the
ChannelBroker
to use theRespondent.with_lock
mutex. This is an evidence of thatDiscovery
The tests were not filtering by
respondent_id
, so they could be using another records than the intended ones for the assertions. The tests were using plainRepo.one!
for fetchingRespondent
,SurveyLogEntry
andRespondentDispositionHistory
models. The thing is that Mix runs tests of different modules in parallel and other tests insert records in those tables, so there is no guarantee from thestop mo
tests that they will be testing the same respondent activity throughout the testObservations
I could not replicate the failures locally, so I actually have no guarantee that these changes fix them. However I find this a plausible cause of the failures Leaving here some other examples of the failures in GHA