@@ -314,41 +314,6 @@ public function testTime() {
314
314
$ this ->assertEquals (strval (intval ($ usec )), strval ($ usec ));
315
315
}
316
316
317
- /* This is a hack to try and fix a consistently flaky test on GitHub CI
318
- * runners. My only guess is that `TIME` requires a syscall, which might
319
- * stall Redis on these VMs long enough to cause a timeout. */
320
- //public function testTimeGitHubCI() {
321
- // for ($i = 0; $i < 5; $i++)
322
- // printf("here\n");
323
-
324
- // if (getenv('GITHUB_ACTIONS') !== 'true')
325
- // $this->markTestSkipped();
326
-
327
- // // VM stall?
328
- // if (function_exists('hrtime')) {
329
- // hrtime(true);
330
- // } else {
331
- // microtime(true);
332
- // }
333
-
334
- // for ($i = 0; $i < 10; $i++) {
335
- // try {
336
- // [$sec, $usec] = $this->redis->time(uniqid());
337
- // $this->assertEquals(strval(intval($sec)), strval($sec));
338
- // $this->assertEquals(strval(intval($usec)), strval($usec));
339
- // } catch (Exception $ex) {
340
- // printf("exception: %s\n", $ex->getMessage());
341
- // foreach ([7000, 7001, 7002] as $port) {
342
- // $st = microtime(true);
343
- // $time = shell_exec("redis-cli --user phpredis -a phpredis -p $port TIME");
344
- // $et = microtime(true);
345
- // printf("TIME[%d]: %s (%.3f sec)\n", $port,
346
- // json_encode($time), $et - $st);
347
- // }
348
- // }
349
- // }
350
- //}
351
-
352
317
public function testScan () {
353
318
$ key_count = 0 ;
354
319
$ scan_count = 0 ;
0 commit comments