test(multiplayer): extend the real integration test to cover queue cancel

Adds a fourth real round trip to control_plane_smoke.gd: heartbeat ->
cancel_queue -> CANCELLED, using the same idle-wait pattern the
heartbeat step already needed. Verified stable across 3 consecutive
full runs (real Postgres, real testkit-api, real headless Godot
client), plus the full Go and Godot unit suites clean.
This commit is contained in:
Josh Creek
2026-09-01 14:16:06 +01:00
parent 6edaedb50d
commit f7657ad9ad
+17 -1
View File
@@ -88,7 +88,13 @@ func _on_request_succeeded(operation: String, payload: Dictionary) -> void:
if int(payload.get("revision", -1)) <= 0:
_finish(false, "heartbeat did not advance the revision: %s" % payload)
return
_finish(true, "login -> queue_create -> heartbeat all round-tripped against a real server")
print("SMOKE: heartbeat advanced to revision %d, cancelling..." % ControlPlaneClient.state.revision)
_send_cancel_once_idle()
"queue_cancel":
if payload.get("state", "") != "CANCELLED":
_finish(false, "unexpected queue_cancel payload: %s" % payload)
return
_finish(true, "login -> queue_create -> heartbeat -> cancel all round-tripped against a real server")
func _send_heartbeat_once_idle() -> void:
@@ -104,6 +110,16 @@ func _send_heartbeat_once_idle() -> void:
_finish(false, "heartbeat() failed to start: %s" % error_string(err))
func _send_cancel_once_idle() -> void:
if not ControlPlaneClient._operation.is_empty():
var poll := get_tree().create_timer(0.05)
poll.timeout.connect(_send_cancel_once_idle)
return
var err := ControlPlaneClient.cancel_queue(_ticket_id, ControlPlaneClient.state.revision)
if err != OK:
_finish(false, "cancel_queue() failed to start: %s" % error_string(err))
func _on_request_failed(operation: String, http_code: int, detail: String) -> void:
if _finished:
return