From 512198de6a3dde661cf0778120447b0c52c2f868 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti Date: Mon, 25 Sep 2023 08:10:05 -0400 Subject: [PATCH] debug do not merge --- tests/system_test.py | 1 + tests/system_tests_edge_router.py | 51 +++++++++++++------------------ 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/tests/system_test.py b/tests/system_test.py index 576546696..7099746eb 100755 --- a/tests/system_test.py +++ b/tests/system_test.py @@ -728,6 +728,7 @@ def management(self): return self._management def teardown(self): + print(f"ROUTER TEARDOWN STARTED {self}", flush=True) if self._management: try: self._management.close() diff --git a/tests/system_tests_edge_router.py b/tests/system_tests_edge_router.py index 9df33be29..f3c90a047 100644 --- a/tests/system_tests_edge_router.py +++ b/tests/system_tests_edge_router.py @@ -1511,10 +1511,6 @@ def test_03_ensure_no_admin_delete(self): ea_1 = self.routers[2] for r in (int_a, ea_1): - try: - r.management.query(type="io.skupper.router.httpListener") - except: - pass conns = [d for d in r.management.query(type=CONNECTION_TYPE).get_dicts() if d['role'] == 'edge'] @@ -1524,10 +1520,6 @@ def test_03_ensure_no_admin_delete(self): r.management.update(attributes={'adminStatus': 'deleted'}, type=CONNECTION_TYPE, identity=conn['identity']) - try: - r.management.query(type="io.skupper.router.httpConnector") - except: - pass def test_74_ensure_no_admin_delete(self): """ @@ -1538,33 +1530,32 @@ def test_74_ensure_no_admin_delete(self): ea_1 = self.routers[2] for xxx in range(10): - sleep(1.0) + sleep(0.5) for r in (int_a, ea_1): print(f"Router={r}", flush=True) try: - r.management.query(type="io.skupper.router.tcpListener") - except: - print("TCP LISTNER QUERY FAILED", flush=True) - pass - print("QUERY FOR CONN", flush=True) - conns = [d for d in - r.management.query(type=CONNECTION_TYPE).get_dicts() if - d['role'] == 'edge'] - print(f"CONN QUERY={conns}", flush=True) - self.assertNotEqual(0, len(conns), f"Expected at least one connection: {conns}") - for conn in conns: - print(f"CONN DELETE={conn}", flush=True) - with self.assertRaises(ForbiddenStatus): - r.management.update(attributes={'adminStatus': 'deleted'}, - type=CONNECTION_TYPE, - identity=conn['identity']) - print(f"CONN DELETED={conn}", flush=True) + r.management.query(type="io.skupper.router.listener") + except Exception as exc: + print(f"LISTNER QUERY FAILED {exc}", flush=True) + + # print("QUERY FOR CONN", flush=True) + # conns = [d for d in + # r.management.query(type=CONNECTION_TYPE).get_dicts() if + # d['role'] == 'edge'] + # print(f"CONN QUERY={conns}", flush=True) + # self.assertNotEqual(0, len(conns), f"Expected at least one connection: {conns}") + # for conn in conns: + # print(f"CONN DELETE={conn}", flush=True) + # with self.assertRaises(ForbiddenStatus): + # r.management.update(attributes={'adminStatus': 'deleted'}, + # type=CONNECTION_TYPE, + # identity=conn['identity']) + # print(f"CONN DELETED={conn}", flush=True) try: - r.management.query(type="io.skupper.router.tcpConnector") - except: - print("TCP CONN QUERY FAILED", flush=True) - pass + r.management.query(type="io.skupper.router.connector") + except Exception as exc: + print(f"CONNECTOR QUERY FAILED {exc}", flush=True) class ConnectivityTest(MessagingHandler):