Closed liam-m closed 8 years ago
There's a race condition?
If the minute ticks over between the comment being created and the time being checked
What would be an acceptable fault tolerance?
Checking if the comment was created within, say, the last day?
I suppose it should either be this minute or the previous one. I'm not sure if RSpec has a decent matcher for this, maybe just Satisfy
The problem then is that it's possible we have another race condition; except this time the testing must finish in <2 minutes instead of <1 minute.
Ideally we just want to test the comment was made in roughly the right time area, and not at something like 1970.
All the tests combined finish in under 4 seconds. If this one test takes over a minute I think it'd be indicative over bigger problems
IMO this is ready to merge now. @Lixquid @TomBrook are you both happy with it?
@Lixquid @TomBrook Review please? Know how to fix the race condition in the tests?