Skip to content

Commit 4635785

Browse files
committed
fixup: Minor cleanup
1 parent cfe1113 commit 4635785

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

tests/antithesis/avalanchego/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (w *workload) run(ctx context.Context) {
163163
defer tc.Recover(true /* rethrow */)
164164

165165
xAVAX, pAVAX := e2e.GetWalletBalances(tc, w.wallet)
166-
tc.Outf("wallet starting with %d X-chain nAVAX and %d P-chain nAVAX", w.id, xAVAX, pAVAX)
166+
tc.Outf("wallet starting with %d X-chain nAVAX and %d P-chain nAVAX", xAVAX, pAVAX)
167167
assert.Reachable("wallet starting", map[string]any{
168168
"worker": w.id,
169169
"xBalance": xAVAX,

tests/simple_test_context.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ func (*SimpleTestContext) GetWriter() io.Writer {
7373
// cleanup functions are called before exit or re-panic (in the event
7474
// of an unexpected panic or a panic during cleanup).
7575
func (tc *SimpleTestContext) RecoverAndExit() {
76-
if tc.cleanupCalled {
77-
return
78-
}
79-
tc.cleanupCalled = true
80-
8176
// Only exit non-zero if a cleanup caused a panic
8277
exitNonZero := false
8378

@@ -89,7 +84,7 @@ func (tc *SimpleTestContext) RecoverAndExit() {
8984
if tc.panicHandler != nil {
9085
tc.panicHandler(r)
9186
}
92-
// Retain the panic data to raise after cleanup in the event that the panic was not due to FailNow
87+
// Retain the panic data to raise after cleanup
9388
panicData = r
9489
} else {
9590
// Ensure a non-zero exit due to an assertion failure
@@ -98,7 +93,6 @@ func (tc *SimpleTestContext) RecoverAndExit() {
9893
}
9994

10095
if panicDuringCleanup := tc.cleanup(); panicDuringCleanup {
101-
// Exit non-zero if a panic occurred during cleanup
10296
exitNonZero = true
10397
}
10498

0 commit comments

Comments
 (0)