aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cache/bug_cache.go2
-rw-r--r--cache/repo_cache_test.go18
2 files changed, 1 insertions, 19 deletions
diff --git a/cache/bug_cache.go b/cache/bug_cache.go
index 01d93593..775af6d1 100644
--- a/cache/bug_cache.go
+++ b/cache/bug_cache.go
@@ -19,7 +19,7 @@ var ErrNoMatchingOp = fmt.Errorf("no matching operation found")
// 3. Deal with concurrency.
type BugCache struct {
repoCache *RepoCache
- mu *sync.RWMutex
+ mu sync.RWMutex
bug *bug.WithSnapshot
}
diff --git a/cache/repo_cache_test.go b/cache/repo_cache_test.go
index a85dd4fb..0deb155e 100644
--- a/cache/repo_cache_test.go
+++ b/cache/repo_cache_test.go
@@ -210,21 +210,3 @@ func TestRemove(t *testing.T) {
_, err = repoCache.ResolveBug(b1.Id())
assert.Error(t, bug.ErrBugNotExist, err)
}
-
-//func TestConcurrency(t *testing.T) {
-// repo := repository.CreateTestRepo(false)
-// defer repository.CleanupTestRepos(repo)
-//
-// cache, err := NewRepoCache(repo)
-// require.NoError(t, err)
-//
-// iden1, err := cache.NewIdentity("René Descartes", "rene@descartes.fr")
-// require.NoError(t, err)
-// err = cache.SetUserIdentity(iden1)
-// require.NoError(t, err)
-//
-// bug1, _, err := cache.NewBug("title", "message")
-// require.NoError(t, err)
-//
-// bug1.mu.Lock()
-//}