mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 13:02:08 +00:00
ci: add ENet integration coverage
This commit is contained in:
@@ -22,6 +22,10 @@ extends Node
|
||||
|
||||
const PORT := 7801
|
||||
const RUN_SECONDS := 6.0
|
||||
# The client starts after the host, so its identical run window ends later.
|
||||
# Keep the host alive through that tail to avoid polling a deliberately
|
||||
# closed transport during a successful clock test.
|
||||
const HOST_GRACE_SECONDS := 1.0
|
||||
const CONVERGE_BY_SEC := 2.0
|
||||
const TICK_MS := 1000.0 / 60.0 # SimConstants.TICK_HZ, kept literal to avoid pulling in the whole project for one constant in a throwaway diagnostic
|
||||
const EPOCH_FILE := "/tmp/cosmicclash_clock_smoke_epoch_offset.txt"
|
||||
@@ -89,6 +93,7 @@ func _on_clock_updated(rtt_ms: float, offset_ms: float) -> void:
|
||||
|
||||
func _on_run_complete() -> void:
|
||||
if _role != "client":
|
||||
await get_tree().create_timer(HOST_GRACE_SECONDS).timeout
|
||||
_finish(true, "host ran for %.1fs" % RUN_SECONDS)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user