@@ -78,7 +78,7 @@ func TestAppHealth_Healthy(t *testing.T) {
7878healthchecksStarted := make ([]string ,2 )
7979for i := 0 ;i < 2 ;i ++ {
8080c := healthcheckTrap .MustWait (ctx )
81- c .Release ( )
81+ c .MustRelease ( ctx )
8282healthchecksStarted [i ]= c .Tags [1 ]
8383}
8484slices .Sort (healthchecksStarted )
@@ -87,7 +87,7 @@ func TestAppHealth_Healthy(t *testing.T) {
8787// advance the clock 1ms before the report ticker starts, so that it's not
8888// simultaneous with the checks.
8989mClock .Advance (time .Millisecond ).MustWait (ctx )
90- reportTrap .MustWait (ctx ).Release ( )
90+ reportTrap .MustWait (ctx ).MustRelease ( ctx )
9191
9292mClock .Advance (999 * time .Millisecond ).MustWait (ctx )// app2 is now healthy
9393
@@ -143,11 +143,11 @@ func TestAppHealth_500(t *testing.T) {
143143
144144fakeAPI ,closeFn := setupAppReporter (ctx ,t ,slices .Clone (apps ),handlers ,mClock )
145145defer closeFn ()
146- healthcheckTrap .MustWait (ctx ).Release ( )
146+ healthcheckTrap .MustWait (ctx ).MustRelease ( ctx )
147147// advance the clock 1ms before the report ticker starts, so that it's not
148148// simultaneous with the checks.
149149mClock .Advance (time .Millisecond ).MustWait (ctx )
150- reportTrap .MustWait (ctx ).Release ( )
150+ reportTrap .MustWait (ctx ).MustRelease ( ctx )
151151
152152mClock .Advance (999 * time .Millisecond ).MustWait (ctx )// check gets triggered
153153mClock .Advance (time .Millisecond ).MustWait (ctx )// report gets triggered, but unsent since we are at the threshold
@@ -202,25 +202,25 @@ func TestAppHealth_Timeout(t *testing.T) {
202202
203203fakeAPI ,closeFn := setupAppReporter (ctx ,t ,apps ,handlers ,mClock )
204204defer closeFn ()
205- healthcheckTrap .MustWait (ctx ).Release ( )
205+ healthcheckTrap .MustWait (ctx ).MustRelease ( ctx )
206206// advance the clock 1ms before the report ticker starts, so that it's not
207207// simultaneous with the checks.
208208mClock .Set (ms (1 )).MustWait (ctx )
209- reportTrap .MustWait (ctx ).Release ( )
209+ reportTrap .MustWait (ctx ).MustRelease ( ctx )
210210
211211w := mClock .Set (ms (1000 ))// 1st check starts
212- timeoutTrap .MustWait (ctx ).Release ( )
212+ timeoutTrap .MustWait (ctx ).MustRelease ( ctx )
213213mClock .Set (ms (1001 )).MustWait (ctx )// report tick, no change
214214mClock .Set (ms (1999 ))// timeout pops
215215w .MustWait (ctx )// 1st check finished
216216w = mClock .Set (ms (2000 ))// 2nd check starts
217- timeoutTrap .MustWait (ctx ).Release ( )
217+ timeoutTrap .MustWait (ctx ).MustRelease ( ctx )
218218mClock .Set (ms (2001 )).MustWait (ctx )// report tick, no change
219219mClock .Set (ms (2999 ))// timeout pops
220220w .MustWait (ctx )// 2nd check finished
221221// app is now unhealthy after 2 timeouts
222222mClock .Set (ms (3000 ))// 3rd check starts
223- timeoutTrap .MustWait (ctx ).Release ( )
223+ timeoutTrap .MustWait (ctx ).MustRelease ( ctx )
224224mClock .Set (ms (3001 )).MustWait (ctx )// report tick, sends changes
225225
226226update := testutil .TryReceive (ctx ,t ,fakeAPI .AppHealthCh ())