From 01ae4ed1f7477d35bfba473885bdef2dc7ee5989 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 10 Dec 2023 23:24:11 +0700 Subject: [PATCH] [ticket/15214] Fix Windows tests PHPBB3-15214 --- .github/workflows/tests.yml | 3 +-- tests/functional/extension_controller_test.php | 7 ------- tests/functional/extension_global_lang_test.php | 7 ------- tests/functional/extension_module_test.php | 1 - tests/functional/extension_permission_lang_test.php | 7 ------- tests/functional/extension_template_event_order_test.php | 7 ------- tests/functional/metadata_manager_test.php | 1 - tests/test_framework/phpbb_functional_test_case.php | 3 +++ 8 files changed, 4 insertions(+), 32 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0fa9a70701..c8c597c01d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -543,10 +543,9 @@ jobs: New-WebHandler -Name "PHP-FastCGI" -Path "*.php" -Modules FastCgiModule -ScriptProcessor "C:\tools\php\php-cgi.exe" -Verb '*' -ResourceType Either iisreset NET START W3SVC - icacls "${env:GITHUB_WORKSPACE}\phpBB\cache" /grant "Users:(OI)(CI)F" /T mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\test" - mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\test\twig" mkdir "${env:GITHUB_WORKSPACE}\phpBB\cache\installer" + icacls "${env:GITHUB_WORKSPACE}\phpBB\cache" /grant Users:F /T icacls "${env:GITHUB_WORKSPACE}\phpBB\files" /grant Users:F /T icacls "${env:GITHUB_WORKSPACE}\phpBB\store" /grant Users:F /T icacls "${env:GITHUB_WORKSPACE}\phpBB\images\avatars\upload" /grant Users:F /T diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php index 0b95b916ad..da1a6e18ae 100644 --- a/tests/functional/extension_controller_test.php +++ b/tests/functional/extension_controller_test.php @@ -55,13 +55,6 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c $this->purge_cache(); } - protected function tearDown(): void - { - $this->purge_cache(); - - parent::tearDown(); - } - /** * Check a controller for extension foo/bar. */ diff --git a/tests/functional/extension_global_lang_test.php b/tests/functional/extension_global_lang_test.php index ae254b3d84..58d4547662 100644 --- a/tests/functional/extension_global_lang_test.php +++ b/tests/functional/extension_global_lang_test.php @@ -52,13 +52,6 @@ class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_ $this->purge_cache(); } - protected function tearDown(): void - { - $this->purge_cache(); - - parent::tearDown(); - } - public function test_load_extension_lang_globally() { $this->phpbb_extension_manager->enable('foo/bar'); diff --git a/tests/functional/extension_module_test.php b/tests/functional/extension_module_test.php index 92e116460a..6f48d6122a 100644 --- a/tests/functional/extension_module_test.php +++ b/tests/functional/extension_module_test.php @@ -43,7 +43,6 @@ class phpbb_functional_extension_module_test extends phpbb_functional_test_case protected function tearDown(): void { $this->phpbb_extension_manager->purge('foo/bar'); - $this->purge_cache(); parent::tearDown(); } diff --git a/tests/functional/extension_permission_lang_test.php b/tests/functional/extension_permission_lang_test.php index 3aae7685d8..6099cdcf73 100644 --- a/tests/functional/extension_permission_lang_test.php +++ b/tests/functional/extension_permission_lang_test.php @@ -41,13 +41,6 @@ class phpbb_functional_extension_permission_lang_test extends phpbb_functional_t self::$helper->restore_original_ext_dir(); } - protected function tearDown(): void - { - $this->purge_cache(); - - parent::tearDown(); - } - protected function setUp(): void { parent::setUp(); diff --git a/tests/functional/extension_template_event_order_test.php b/tests/functional/extension_template_event_order_test.php index c77cb7b89f..c931c95bc1 100644 --- a/tests/functional/extension_template_event_order_test.php +++ b/tests/functional/extension_template_event_order_test.php @@ -39,13 +39,6 @@ class phpbb_functional_extension_template_event_order_test extends phpbb_functio self::$helper->restore_original_ext_dir(); } - protected function tearDown(): void - { - $this->purge_cache(); - - parent::tearDown(); - } - protected function setUp(): void { parent::setUp(); diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php index 5dff5d6227..2c885c5f8f 100644 --- a/tests/functional/metadata_manager_test.php +++ b/tests/functional/metadata_manager_test.php @@ -27,7 +27,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case protected function tearDown(): void { $this->phpbb_extension_manager->purge('foo/bar'); - $this->purge_cache(); parent::tearDown(); } diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 90cbb40626..3bb99d13cc 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -123,6 +123,9 @@ class phpbb_functional_test_case extends phpbb_test_case // Close the database connections again this test $this->db->sql_close(); } + + $this->purge_cache(); + sleep(3); // Give it some time to delete all the files correctly } /**