OLD | NEW |
1 package local_db | 1 package local_db |
2 | 2 |
3 import ( | 3 import ( |
4 "io/ioutil" | 4 "io/ioutil" |
5 "path/filepath" | 5 "path/filepath" |
6 "sort" | 6 "sort" |
7 "testing" | 7 "testing" |
8 "time" | 8 "time" |
9 | 9 |
10 assert "github.com/stretchr/testify/require" | 10 assert "github.com/stretchr/testify/require" |
11 "go.skia.org/infra/build_scheduler/go/db" | |
12 "go.skia.org/infra/go/testutils" | 11 "go.skia.org/infra/go/testutils" |
13 "go.skia.org/infra/go/util" | 12 "go.skia.org/infra/go/util" |
| 13 "go.skia.org/infra/task_scheduler/go/db" |
14 ) | 14 ) |
15 | 15 |
16 // Check that formatId and parseId are inverse operations and produce the | 16 // Check that formatId and parseId are inverse operations and produce the |
17 // expected result. | 17 // expected result. |
18 func TestFormatParseId(t *testing.T) { | 18 func TestFormatParseId(t *testing.T) { |
19 testCases := []struct { | 19 testCases := []struct { |
20 ts time.Time | 20 ts time.Time |
21 seq uint64 | 21 seq uint64 |
22 id string | 22 id string |
23 }{ | 23 }{ |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 d, tmpdir := makeDB(t, "TestLocalDBConcurrentUpdate") | 433 d, tmpdir := makeDB(t, "TestLocalDBConcurrentUpdate") |
434 defer util.RemoveAll(tmpdir) | 434 defer util.RemoveAll(tmpdir) |
435 db.TestConcurrentUpdate(t, d) | 435 db.TestConcurrentUpdate(t, d) |
436 } | 436 } |
437 | 437 |
438 func TestLocalDBUpdateWithRetries(t *testing.T) { | 438 func TestLocalDBUpdateWithRetries(t *testing.T) { |
439 d, tmpdir := makeDB(t, "TestLocalDBUpdateWithRetries") | 439 d, tmpdir := makeDB(t, "TestLocalDBUpdateWithRetries") |
440 defer util.RemoveAll(tmpdir) | 440 defer util.RemoveAll(tmpdir) |
441 db.TestUpdateWithRetries(t, d) | 441 db.TestUpdateWithRetries(t, d) |
442 } | 442 } |
OLD | NEW |