test: stp_basic: Stabilize test

With the new yangerd it failed 100% of the times, but it could fail
before as well, but that whould be very rare. Wait until operational
has been updated.
This commit is contained in:
Mattias Walström
2026-06-24 15:53:03 +02:00
parent 231987ea2b
commit a085cec850
@@ -167,6 +167,8 @@ with infamy.Test() as test:
lambda: explicit_prios(c), lambda: explicit_prios(d))
with test.step("Verify that A, B, C and D agrees on A being the root bridge"):
# Snapshot A's bridge-id only once it reflects the configured priority (1); oper data lags config.
until(lambda: (bridge_id(a, "bridge-id") or "").startswith("1."), 120)
a_id = bridge_id(a, "bridge-id")
print(f"A's bridge-id: {a_id}")
until(lambda: all(map(lambda n: bridge_id(n, "root-id") == a_id, (a, b, c, d))), 120)