소스 검색

[HttpKernel] fixed a test that randomly fails

Fabien Potencier 14 년 전
부모
커밋
4594cd223b
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      tests/Symfony/Tests/Component/HttpKernel/HttpCache/HttpCacheTest.php

+ 3 - 1
tests/Symfony/Tests/Component/HttpKernel/HttpCache/HttpCacheTest.php

@@ -923,7 +923,9 @@ class HttpCacheTest extends HttpCacheTestCase
 
         $this->request('GET', '/', array(), array(), true);
         $this->assertEquals("Hello World! My name is Bobby.", $this->response->getContent());
-        $this->assertEquals(100, $this->response->getTtl());
+
+        // check for 100 or 99 as the test can be executed after a second change
+        $this->assertTrue(in_array($this->response->getTtl(), array(99, 100)));
     }
 
     public function testEsiCacheForceValidation()