The difference between two integers is less than 1 only if it's 0, so
the test as-is will fail whenever the second changes between when '1
day' is evaluated when inserting the block, and when time() is called
for the assert.
Change-Id: Ic76ff05729129b74345696879a934253525213fa
);
// Allow flakiness up to one second
);
// Allow flakiness up to one second
- $this->assertLessThan( 1,
+ $this->assertLessThanOrEqual( 1,
abs( wfTimestamp( TS_UNIX, $expiry ) - ( time() + 86400 ) ) );
}
abs( wfTimestamp( TS_UNIX, $expiry ) - ( time() + 86400 ) ) );
}