mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
* FIX: randomly falling user_spec When we evaluate `update_last_seen!` we relay on Redis to not run that code too often https://github.com/discourse/discourse/blob/master/app/models/user.rb#L753 The problem is that not all specs which are running `update_last_seen!` are not cleaning after themselves For examples specs in that block https://github.com/discourse/discourse/blob/master/spec/models/user_spec.rb#L901 So it can be replicated when you run a few times `bundle exec rspec ./spec/models/user_spec.rb -e "should not update the first seen value if it doesn't exist" -e "should have 0 for days_visited"` We should delete Redis key after each spec which is evaluating `update_last_seen!`