Commit 731ca982 authored by Miguel Catalan's avatar Miguel Catalan
Browse files

improving the responses to match camara style

parent 1dd8111c
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -172,7 +172,23 @@ def test_qos_session_notification(oran_client: BaseOranClient, notification_serv
    print("[Test] Sleeping 10s")
    time.sleep(10)

    # Expect an additional callback (e.g., deletion)
    # Expect an additional callback (e.g., two deletion)
    assert _wait_for_callbacks(
        notification_server["received"], 2, timeout=10, start_len=start_len
    ), "Did not receive post-deletion callback"
    if len(notification_server["received"]) > start_len:
        print("\n----- [Test] Callbacks collected -----")
        for rec in notification_server["received"][start_len:]:
            print(pformat(rec))
            try:
                transformed = oran_client.notification_to_camara_session(
                    rec["payload"], original_session=camara_session_info2
                )
                print("[Notify] Transformed to CAMARA:")
                print(pformat(transformed))
            except Exception as exc:
                print(f"[Notify] Transform error: {exc}")

    assert _wait_for_callbacks(
        notification_server["received"], 2, timeout=10, start_len=start_len
    ), "Did not receive post-deletion callback"