File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
tests/system/Cache/Handlers Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,14 @@ public function testGetMetaData()
191
191
$ this ->assertFalse ($ this ->memcachedHandler ->getMetaData (self ::$ dummy ));
192
192
193
193
$ actual = $ this ->memcachedHandler ->getMetaData (self ::$ key1 );
194
- $ this ->assertLessThanOrEqual (60 , $ actual ['expire ' ] - $ time );
194
+
195
+ // This test is time-dependent, and depending on the timing,
196
+ // seconds in `$time` (e.g. 12:00:00.9999) and seconds of
197
+ // `$this->memcachedHandler->save()` (e.g. 12:00:01.0000)
198
+ // may be off by one second. In that case, the following calculation
199
+ // will result in maximum of (60 + 1).
200
+ $ this ->assertLessThanOrEqual (60 + 1 , $ actual ['expire ' ] - $ time );
201
+
195
202
$ this ->assertLessThanOrEqual (1 , $ actual ['mtime ' ] - $ time );
196
203
$ this ->assertSame ('value ' , $ actual ['data ' ]);
197
204
}
You can’t perform that action at this time.
0 commit comments