chainntnfs: ensure previous test succeeded before running

This commit is contained in:
yyforyongyu
2024-11-26 22:13:48 +08:00
parent fb429d658b
commit f03e242515
3 changed files with 20 additions and 4 deletions

View File

@@ -173,7 +173,7 @@ func TestTxNotifierRegistrationValidation(t *testing.T) {
for _, testCase := range testCases {
testCase := testCase
t.Run(testCase.name, func(t *testing.T) {
success := t.Run(testCase.name, func(t *testing.T) {
hintCache := newMockHintCache()
n := chainntnfs.NewTxNotifier(
10, chainntnfs.ReorgSafetyLimit, hintCache, hintCache,
@@ -201,6 +201,10 @@ func TestTxNotifierRegistrationValidation(t *testing.T) {
"\"%v\", got \"%v\"", testCase.err, err)
}
})
if !success {
return
}
}
}