Hacktoberfest / hacktoberfest-2020

Hacktoberfest - App to manage the annual open-source challenge, used for the 2019 & 2020 seasons.

Home Page:https://hacktoberfest.digitalocean.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.