mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 16:31:56 +03:00
Address review: use slices.Clone, simplify concurrent test
- Replace manual make+copy with slices.Clone in Snapshot() - Remove redundant _ = len(data); Snapshot() call alone is sufficient to exercise the lock under -race
This commit is contained in:
@@ -68,8 +68,8 @@ func (suite *ScoutConnCollectedTestSuite) TestConcurrentAddSnapshot() {
|
||||
defer wg.Done()
|
||||
|
||||
for i := 0; i < 1000; i++ {
|
||||
data, _ := collected.Snapshot()
|
||||
_ = len(data)
|
||||
// call Snapshot concurrently to exercise the lock under -race
|
||||
collected.Snapshot() //nolint:errcheck
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user