Skip to content

Commit dfbba1f

Browse files
committed
debug watch tests with sleeps
1 parent 2dcf557 commit dfbba1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

integration/invalidation/watch-source-input/src/WatchSourceInputTests.scala

+6-1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ object WatchSourceTests extends WatchTests {
8383
"Running qux foo contents initial-foo1 initial-foo2 Running qux bar contents initial-bar"
8484
)
8585

86+
Thread.sleep(1000) // Wait for the watching to begin
8687
os.write.over(workspacePath / "foo1.txt", "edited-foo1")
8788
awaitCompletionMarker(tester, "quxRan1")
8889
expectedErr.append(
@@ -92,7 +93,8 @@ object WatchSourceTests extends WatchTests {
9293
expectedShows.append(
9394
"Running qux foo contents edited-foo1 initial-foo2 Running qux bar contents initial-bar"
9495
)
95-
96+
97+
Thread.sleep(1000) // Wait for the watching to begin
9698
os.write.over(workspacePath / "foo2.txt", "edited-foo2")
9799
awaitCompletionMarker(tester, "quxRan2")
98100
expectedErr.append(
@@ -103,6 +105,7 @@ object WatchSourceTests extends WatchTests {
103105
"Running qux foo contents edited-foo1 edited-foo2 Running qux bar contents initial-bar"
104106
)
105107

108+
Thread.sleep(1000) // Wait for the watching to begin
106109
os.write.over(workspacePath / "bar.txt", "edited-bar")
107110
awaitCompletionMarker(tester, "quxRan3")
108111
expectedErr.append(
@@ -113,6 +116,7 @@ object WatchSourceTests extends WatchTests {
113116
"Running qux foo contents edited-foo1 edited-foo2 Running qux bar contents edited-bar"
114117
)
115118

119+
Thread.sleep(1000) // Wait for the watching to begin
116120
os.write.append(workspacePath / "build.mill", "\ndef unrelated = true")
117121
awaitCompletionMarker(tester, "initialized1")
118122
expectedOut.append(
@@ -124,6 +128,7 @@ object WatchSourceTests extends WatchTests {
124128
)
125129

126130
if (show) expectedOut.append("{}")
131+
Thread.sleep(1000) // Wait for the watching to begin
127132
os.write.over(workspacePath / "watchValue.txt", "exit")
128133
awaitCompletionMarker(tester, "initialized2")
129134
expectedOut.append("Setting up build.mill")

0 commit comments

Comments
 (0)