Tests must use locking to avoid race (fixes #2394)
This commit is contained in:
@@ -136,3 +136,9 @@ func (t *ProgressEmitter) BytesCompleted(folder string) (bytes int64) {
|
||||
func (t *ProgressEmitter) String() string {
|
||||
return fmt.Sprintf("ProgressEmitter@%p", t)
|
||||
}
|
||||
|
||||
func (t *ProgressEmitter) lenRegistry() int {
|
||||
t.mut.Lock()
|
||||
defer t.mut.Unlock()
|
||||
return len(t.registry)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user