liam-m / flippd

A lightweight VLE for the "flipped classroom"
1 stars 0 forks source link

Comments feature #42

Closed liam-m closed 8 years ago

liam-m commented 8 years ago

@Lixquid @TomBrook Review please? Know how to fix the race condition in the tests?

Lixquid commented 8 years ago

There's a race condition?

liam-m commented 8 years ago

If the minute ticks over between the comment being created and the time being checked

Lixquid commented 8 years ago

What would be an acceptable fault tolerance?

Checking if the comment was created within, say, the last day?

liam-m commented 8 years ago

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

Lixquid commented 8 years ago

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.

liam-m commented 8 years ago

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

liam-m commented 8 years ago

IMO this is ready to merge now. @Lixquid @TomBrook are you both happy with it?