Update tests/test_utils_pvpreload.py
Run CI Tests / test (push) Successful in 1m9s

This commit is contained in:
2025-08-07 23:24:32 +02:00
parent b9dcc93ea6
commit 465a560e43
+12 -6
View File
@@ -175,13 +175,19 @@ def test_offload(tmp_path, caplog):
pvname_4 = "TEST:PV4"
# Create 2 PVs
pv_3 = PV(pvname_3, connection_timeout=2.0)
get_pv(pv_3)
assert pv_3.wait_for_connection(timeout=2.0), "PV not connected"
pv_3 = get_pv(pvname_3, connect=True, timeout=2.0)
pv_4 = get_pv(pvname_4, connect=True, timeout=2.0)
pv_4 = PV(pvname_4, connection_timeout=2.0)
get_pv(pv_4)
assert pv_4.wait_for_connection(timeout=2.0), "PV not connected"
# 3. Attente active de connexion
assert pv_3.wait_for_connection(timeout=2), "PV3 non connecté"
assert pv_4.wait_for_connection(timeout=2), "PV4 non connecté"
# 4. Opérations pour forcer le cache
_ = pv_3.get()
_ = pv_4.get()
assert pv_3.connected, "PV3 marqué comme non connecté"
assert pv_4.connected, "PV4 marqué comme non connecté"
print(epics.pv._PVcache_.values())