Fix data race in finder_test.go
Wait for newFinder to finish writing its dump before ticking the clock.
Test: go test -race ./...
Change-Id: Ib7527ebfb4e1c989deefdb0779a4f9c0928ae15d
diff --git a/finder/finder_test.go b/finder/finder_test.go
index 8f73719..be22d13 100644
--- a/finder/finder_test.go
+++ b/finder/finder_test.go
@@ -813,6 +813,7 @@
IncludeFiles: []string{"findme.txt"},
},
)
+ finder.WaitForDbDump()
filesystem.Clock.Tick()
foundPaths := finder.FindNamedAt("/tmp", "findme.txt")
finder.Shutdown()
@@ -1445,6 +1446,7 @@
IncludeFiles: []string{"hi.txt"},
},
)
+ finder.WaitForDbDump()
filesystem.Clock.Tick()
foundPaths := finder.FindAll()
finder.Shutdown()
@@ -1506,6 +1508,7 @@
IncludeFiles: []string{"hi.txt"},
},
)
+ finder.WaitForDbDump()
filesystem.Clock.Tick()
foundPaths := finder.FindAll()
finder.Shutdown()
@@ -1552,6 +1555,7 @@
IncludeFiles: []string{"hi.txt"},
},
)
+ finder.WaitForDbDump()
filesystem.Clock.Tick()
foundPaths := finder.FindAll()
finder.Shutdown()
@@ -1573,6 +1577,7 @@
IncludeFiles: []string{"hi.txt"},
},
)
+ finder.WaitForDbDump()
filesystem.Clock.Tick()
foundPaths := finder.FindAll()
finder.Shutdown()