Skip to content

Commit

Permalink
fix defer
Browse files Browse the repository at this point in the history
  • Loading branch information
i-norden committed Aug 16, 2023
1 parent caa6ccb commit 71154cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions amt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1092,13 +1092,13 @@ func TestForEachParallelTracked(t *testing.T) {
}
}
m.Lock()
defer m.Unlock()
_, ok := expectedTrails[trailStr]
if !ok {
return fmt.Errorf("unexpected trail: %s", trailStr)
}
delete(expectedTrails, trailStr)
delete(foundVals, i)
m.Unlock()
return nil
})
if err != nil {
Expand Down Expand Up @@ -1144,13 +1144,13 @@ func TestForEachParallelTracked(t *testing.T) {
}
}
m.Lock()
defer m.Unlock()
_, ok := expectedTrails[trailStr]
if !ok {
return fmt.Errorf("unexpected trail: %s", trailStr)
}
delete(expectedTrails, trailStr)
delete(foundVals, i)
m.Unlock()
return nil
})
if err != nil {
Expand Down Expand Up @@ -1196,13 +1196,13 @@ func TestForEachParallelTracked(t *testing.T) {
}
}
m.Lock()
defer m.Unlock()
_, ok := expectedTrails[trailStr]
if !ok {
return fmt.Errorf("unexpected trail: %s", trailStr)
}
delete(expectedTrails, trailStr)
delete(foundVals, i)
m.Unlock()
return nil
})
if err != nil {
Expand Down Expand Up @@ -1272,13 +1272,13 @@ func TestForEachParallelTrackedWithNodeSink(t *testing.T) {
}
}
m.Lock()
defer m.Unlock()
_, ok := expectedTrails[trailStr]
if !ok {
return fmt.Errorf("unexpected trail: %s", trailStr)
}
delete(expectedTrails, trailStr)
delete(foundVals, i)
m.Unlock()
return nil
})
if err != nil {
Expand Down Expand Up @@ -1332,13 +1332,13 @@ func TestForEachParallelTrackedWithNodeSink(t *testing.T) {
}
}
m.Lock()
defer m.Unlock()
_, ok := expectedTrails[trailStr]
if !ok {
return fmt.Errorf("unexpected trail: %s", trailStr)
}
delete(expectedTrails, trailStr)
delete(foundVals, i)
m.Unlock()
return nil
})
if err != nil {
Expand Down Expand Up @@ -1389,13 +1389,13 @@ func TestForEachParallelTrackedWithNodeSink(t *testing.T) {
}
}
m.Lock()
defer m.Unlock()
_, ok := expectedTrails[trailStr]
if !ok {
return fmt.Errorf("unexpected trail: %s", trailStr)
}
delete(expectedTrails, trailStr)
delete(foundVals, i)
m.Unlock()
return nil
})
if err != nil {
Expand Down

0 comments on commit 71154cb

Please sign in to comment.