Skip to content

Commit 8e04d08

Browse files
authored
Increase --watch integration test timeouts & enable --offline mode in them (#2494)
1 parent 72cca0b commit 8e04d08

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

modules/integration/src/test/scala/scala/cli/integration/BloopTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class BloopTests extends ScalaCliSuite {
136136

137137
test("Restart Bloop server while watching") {
138138
TestUtil.withThreadPool("bloop-restart-test", 2) { pool =>
139-
val timeout = Duration("20 seconds")
139+
val timeout = Duration("90 seconds")
140140
val ec = ExecutionContext.fromExecutorService(pool)
141141

142142
def content(message: String) =
@@ -150,7 +150,7 @@ class BloopTests extends ScalaCliSuite {
150150
sourcePath -> content("Hello")
151151
)
152152
inputs.fromRoot { root =>
153-
val proc = os.proc(TestUtil.cli, "run", "-w", ".")
153+
val proc = os.proc(TestUtil.cli, "run", "--power", "--offline", "-w", ".")
154154
.spawn(cwd = root)
155155
val firstLine = TestUtil.readLine(proc.stdout, ec, timeout)
156156
expect(firstLine == "Hello")

modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,21 @@ class RunTestsDefault extends RunTestDefinitions(scalaVersionOpt = None) {
102102

103103
publishLib()
104104

105-
val proc = os.proc(TestUtil.cli, "run", "app", "-w", "-r", testRepo.toNIO.toUri.toASCIIString)
105+
val proc = os.proc(
106+
TestUtil.cli,
107+
"--power",
108+
"run",
109+
"--offline",
110+
"app",
111+
"-w",
112+
"-r",
113+
testRepo.toNIO.toUri.toASCIIString
114+
)
106115
.spawn(cwd = root)
107116

108117
try
109118
TestUtil.withThreadPool("watch-artifacts-test", 2) { pool =>
110-
val timeout = Duration("20 seconds")
119+
val timeout = Duration("90 seconds")
111120
val ec = ExecutionContext.fromExecutorService(pool)
112121

113122
val output = TestUtil.readLine(proc.stdout, ec, timeout)

0 commit comments

Comments
 (0)