Properly fix single inconsistent CI spec failure
mkcode opened this issue · comments
The file spec/jobs/transition_all_users_job_spec.rb
: https://github.com/raise-dev/hacktoberfest/blob/972d3ab380cbe8754a500a7dd62dc55617f36c88/spec/jobs/transition_all_users_job_spec.rb has a strange failure on CI. We expect there to be only 2 users when running the test, which is the case when running the specs locally. But for some reason, on CI only, there are 5 users in the DB when running this spec. There are always 5, so it is not related to the order the specs are run in.
We are using a workaround here, by simply destroying the users before the spec is run: https://github.com/raise-dev/hacktoberfest/pull/400/files#r343222246, but we should spend the time to properly fix this.