Skip to content

Commit

Permalink
fix flaky tests in boltdb-shipper (#2831)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepsukhani authored Oct 28, 2020
1 parent 7f4d6d5 commit feb66d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkg/storage/stores/shipper/downloads/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func buildTestTable(t *testing.T, tableName, path string) (*Table, *local.BoltIn
}

func TestTable_MultiQueries(t *testing.T) {
tempDir, err := ioutil.TempDir("", "table-writes")
tempDir, err := ioutil.TempDir("", "table-downloads-multi-queries")
require.NoError(t, err)

defer func() {
Expand Down Expand Up @@ -102,7 +102,7 @@ func TestTable_MultiQueries(t *testing.T) {
}

func TestTable_Sync(t *testing.T) {
tempDir, err := ioutil.TempDir("", "table-writes")
tempDir, err := ioutil.TempDir("", "table-sync")
require.NoError(t, err)

defer func() {
Expand Down Expand Up @@ -178,7 +178,7 @@ func TestTable_Sync(t *testing.T) {
}

func TestTable_LastUsedAt(t *testing.T) {
tempDir, err := ioutil.TempDir("", "table-writes")
tempDir, err := ioutil.TempDir("", "table-last-used-at")
require.NoError(t, err)

table, _, stopFunc := buildTestTable(t, "test", tempDir)
Expand Down Expand Up @@ -240,7 +240,7 @@ func TestTable_doParallelDownload(t *testing.T) {
}

func TestTable_DuplicateIndex(t *testing.T) {
tempDir, err := ioutil.TempDir("", "table-writes")
tempDir, err := ioutil.TempDir("", "table-duplicate-index")
require.NoError(t, err)

defer func() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/stores/shipper/uploads/table_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func buildTestTableManager(t *testing.T, testDir string) (*TableManager, *local.
}

func TestLoadTables(t *testing.T) {
testDir, err := ioutil.TempDir("", "cleanup")
testDir, err := ioutil.TempDir("", "load-tables")
require.NoError(t, err)

defer func() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/stores/shipper/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func Test_GetFileFromStorage(t *testing.T) {
}

func Test_CompressFile(t *testing.T) {
tempDir, err := ioutil.TempDir("", "table-compaction")
tempDir, err := ioutil.TempDir("", "compress-file")
require.NoError(t, err)

defer func() {
Expand Down

0 comments on commit feb66d6

Please sign in to comment.