Skip to content
Permalink
Browse files

Lower times to resolve windows issues.

* Lower the duration and sleep() time to reduce issues on windows.
* Clearing the file handle out fixes issues on windows where file
  handles would persist after the file was deleted.
  • Loading branch information...
markstory committed Jul 26, 2014
1 parent 7b0179b commit c45868e871ba889c158f583b6dc7afd7746dcfe4
Showing with 3 additions and 2 deletions.
  1. +1 −0 src/Cache/Engine/FileEngine.php
  2. +2 −2 tests/TestCase/Cache/Engine/FileEngineTest.php
@@ -152,6 +152,7 @@ public function write($key, $data) {
if ($this->_config['lock']) {
$this->_File->flock(LOCK_UN);
}
$this->_File = null;
return $success;
}
@@ -191,7 +191,7 @@ public function testSerialize() {
* @return void
*/
public function testClear() {
$this->_configCache(['duration' => 1]);
$this->_configCache(['duration' => 0]);
$data = 'this is a test of the emergency broadcasting system';
Cache::write('serialize_test1', $data, 'file_test');
@@ -201,7 +201,7 @@ public function testClear() {
$this->assertTrue(file_exists(TMP . 'tests/cake_serialize_test2'));
$this->assertTrue(file_exists(TMP . 'tests/cake_serialize_test3'));
sleep(2);
sleep(1);
$result = Cache::clear(true, 'file_test');
$this->assertTrue($result);
$this->assertFalse(file_exists(TMP . 'tests/cake_serialize_test1'));

0 comments on commit c45868e

Please sign in to comment.
You can’t perform that action at this time.