mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-12 16:15:33 +00:00
Disable TestLanguageServerCommonFunctionality::test_open_file_cache_invalidate in Windows CI #1039
This commit is contained in:
1 parent
2024747e7f
commit
e20af1a328
1 file changed
+4
-9
@@ -1,17 +1,18 @@
|
||||
import os
|
||||
import platform
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from solidlsp import SolidLanguageServer
|
||||
from solidlsp.ls_config import Language
|
||||
from test.conftest import is_ci
|
||||
from test.conftest import is_ci, is_windows
|
||||
|
||||
|
||||
class TestLanguageServerCommonFunctionality:
|
||||
"""Test common functionality of SolidLanguageServer base implementation (not language-specific behaviour)."""
|
||||
|
||||
@pytest.mark.skipif(
|
||||
is_ci and is_windows, reason="This test is flaky in Windows CI (file system does not update modified time reliably)."
|
||||
)
|
||||
@pytest.mark.parametrize("language_server", [Language.PYTHON], indirect=True)
|
||||
def test_open_file_cache_invalidate(self, language_server: SolidLanguageServer) -> None:
|
||||
"""
|
||||
@@ -32,12 +33,6 @@ class TestLanguageServerCommonFunctionality:
|
||||
with open(file_path, "w") as f:
|
||||
f.write(test_string2)
|
||||
|
||||
# ensure that mtime is updated for Windows CI (odd FS behaviour, updates lazily)
|
||||
if is_ci and platform.system() == "Windows":
|
||||
now = time.time()
|
||||
os.utime(file_path, (now, now))
|
||||
time.sleep(5)
|
||||
|
||||
# check that the file buffer has been invalidated and reloaded
|
||||
assert fb.contents == test_string2
|
||||
|
||||
|
||||
Reference in new issue
Block a user