diff --git a/doc/changelog.d/3315.fixed.md b/doc/changelog.d/3315.fixed.md new file mode 100644 index 0000000000..3fc2c39816 --- /dev/null +++ b/doc/changelog.d/3315.fixed.md @@ -0,0 +1 @@ +fix: Making sure we skip all the pool unit tests. \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index 3771d9d0fe..c91df8b2a7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -272,10 +272,13 @@ def pytest_report_header(config, start_path, startdir): for env_var in [ "PYMAPDL_START_INSTANCE", "PYMAPDL_PORT", + "PYMAPDL_PORT2", "PYMAPDL_DB_PORT", "PYMAPDL_IP", + "PYMAPDL_IP2", "DPF_PORT", "DPF_START_SERVER", + "IGNORE_POOL", ]: env_var_value = os.environ.get(env_var, None) if env_var_value is not None: diff --git a/tests/test_pool.py b/tests/test_pool.py index 125233a266..467b4e285b 100644 --- a/tests/test_pool.py +++ b/tests/test_pool.py @@ -46,13 +46,16 @@ # skip entire module unless HAS_GRPC pytestmark = requires("grpc") +# Check env var +IGNORE_POOL = os.environ.get("IGNORE_POOL", "").upper() == "TRUE" + # skipping if ON_STUDENT and ON_LOCAL because we cannot spawn that many instances. if ON_STUDENT and ON_LOCAL: pytest.skip(allow_module_level=True) skip_if_ignore_pool = pytest.mark.skipif( - os.environ.get("IGNORE_POOL", "").upper() == "TRUE", + IGNORE_POOL, reason="Ignoring Pool tests.", ) @@ -140,6 +143,7 @@ def test_invalid_exec(self): additional_switches=QUICK_LAUNCH_SWITCHES, ) + @skip_if_ignore_pool def test_heal(self, pool): pool_sz = len(pool) pool_names = pool._names # copy pool names @@ -362,6 +366,7 @@ def test_ip(self, monkeypatch): assert args["ips"] == ips assert args["ports"] == ports + @skip_if_ignore_pool def test_next(self, pool): # Check the instances are free for each_instance in pool: @@ -378,6 +383,7 @@ def test_next(self, pool): assert not each_instance.locked assert not each_instance._busy + @skip_if_ignore_pool def test_next_with_returns_index(self, pool): # Check the instances are free for each_instance in pool: