forked from alicebob/miniredis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Goleak[1] found unclosed goroutines in tests, for example `miniredis_test.go:TestDump`[2] never calls `s.Close()` ```go func TestDump(t *testing.T) { s, err := Run() ok(t, err) s.Set("aap", "noot") s.Set("vuur", "mies") // ... } ``` I've changed `Run()` calls to `RunT(t)` calls to: - ensure all goroutines all closed after test is finished - we have shorter tests (no need to check for error and close server There is no risk in using RunT even if test manually closes server because calling Close multiple times is not an issue. [1] http://go.uber.org/goleak [2] https://github.com/alicebob/miniredis/blob/9ac631e686635ffc17cb1fb45027b8a67f125c80/miniredis_test.go#L88-L129 Signed-off-by: Wojciech Szarański <[email protected]>
- Loading branch information
1 parent
814c2e8
commit 0dd44a9
Showing
17 changed files
with
191 additions
and
560 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.