Fix test flakes

This commit is contained in:
Fabian Reinartz 2017-09-11 10:33:17 +02:00
parent 6892fc6dcb
commit 24362567b9
1 changed files with 2 additions and 1 deletions

View File

@ -382,7 +382,7 @@ func TestWALRestoreCorrupted(t *testing.T) {
t.Run(c.name, func(t *testing.T) {
// Generate testing data. It does not make semantical sense but
// for the purpose of this test.
dir, err := ioutil.TempDir("", "test_corrupted_checksum")
dir, err := ioutil.TempDir("", "test_corrupted")
require.NoError(t, err)
defer os.RemoveAll(dir)
@ -399,6 +399,7 @@ func TestWALRestoreCorrupted(t *testing.T) {
require.NoError(t, w.Close())
w.files[0].Sync()
// Corrupt the second entry in the first file.
// After re-opening we must be able to read the first entry
// and the rest, including the second file, must be truncated for clean further