test(fsrepo)PERF allow tests to run in parallel
Brian Tiger Chow committed
Jan 14, 2015 at 09:15 UTC
b666163e523c76018e27226de7e80215cdcf31fb
1 file changed
+7
repo/fsrepo/fsrepo_test.go
+7
@@ -19,6 +19,7 @@ func testRepoPath(p string, t *testing.T) string {
19
}
20
21
func TestInitIdempotence(t *testing.T) {
22
+ t.Parallel()
23
path := testRepoPath("", t)
24
for i := 0; i < 10; i++ {
25
AssertNil(Init(path, &config.Config{}), t, "multiple calls to init should succeed")
@@ -26,11 +27,13 @@ func TestInitIdempotence(t *testing.T) {
27
}
28
29
func TestRemove(t *testing.T) {
30
+ t.Parallel()
31
path := testRepoPath("foo", t)
32
AssertNil(Remove(path), t, "should be able to remove after closed")
33
}
34
35
func TestCannotRemoveIfOpen(t *testing.T) {
36
+ t.Parallel()
37
path := testRepoPath("TestCannotRemoveIfOpen", t)
38
AssertNil(Init(path, &config.Config{}), t, "should initialize successfully")
39
r := At(path)
@@ -41,6 +44,7 @@ func TestCannotRemoveIfOpen(t *testing.T) {
44
}
45
46
func TestCannotBeReopened(t *testing.T) {
47
+ t.Parallel()
48
path := testRepoPath("", t)
49
AssertNil(Init(path, &config.Config{}), t)
50
r := At(path)
@@ -53,6 +57,7 @@ func TestCannotBeReopened(t *testing.T) {
57
}
58
59
func TestCanManageReposIndependently(t *testing.T) {
60
+ t.Parallel()
61
pathA := testRepoPath("a", t)
62
pathB := testRepoPath("b", t)
63
@@ -80,6 +85,7 @@ func TestCanManageReposIndependently(t *testing.T) {
85
}
86
87
func TestDatastoreGetNotAllowedAfterClose(t *testing.T) {
88
+ t.Parallel()
89
path := testRepoPath("test", t)
90
91
Assert(!IsInitialized(path), t, "should NOT be initialized")
@@ -97,6 +103,7 @@ func TestDatastoreGetNotAllowedAfterClose(t *testing.T) {
103
}
104
105
func TestDatastorePersistsFromRepoToRepo(t *testing.T) {
106
+ t.Parallel()
107
path := testRepoPath("test", t)
108
109
AssertNil(Init(path, &config.Config{}), t)