btest/broker/publish-errors: Avoid exit(0)

Calling exit() doesn't properly shutdown the manager instances and TSAN reports a
leaked thread. Just avoid this for now by using terminate() instead.
This commit is contained in:
Arne Welzel 2025-06-24 17:03:59 +02:00
parent b1157e4e03
commit 2e30f87e33
3 changed files with 3 additions and 1 deletions

View file

@ -1,2 +1,3 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
error in ../send.zeek, line 18: expected Broker::Event, got Cluster::Event (Broker::publish(/test/topic, <internal>::evt.18))
received termination signal

View file

@ -1,2 +1,3 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
error in ../send.zeek, line 18: expected Broker::Event, got Cluster::Event (Broker::publish(/test/topic, evt))
received termination signal

View file

@ -31,7 +31,7 @@ event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
local evt = Cluster::make_event(my_event, 42);
local r = Broker::publish("/test/topic", evt);
assert ! r; # Supposed to fail.
exit(0);
terminate();
}
# @TEST-END-FILE