Skip to content

Commit 9b2b51e

Browse files
committed
[ fix ] Timeout on Auto on Windows
1 parent 3640dec commit 9b2b51e

File tree

6 files changed

+220
-60
lines changed

6 files changed

+220
-60
lines changed

lib/js/src/Main/Main.bs.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/test/tests/Test__Auto.bs.js

Lines changed: 62 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/test/tests/Test__Util.bs.js

Lines changed: 65 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Main/Main.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ let activateWithoutContext = (
213213
log: Chan.make(),
214214
}
215215
// subscribe to the logging channel when in debug mode
216-
let debug = false
216+
let debug = true
217217
if debug {
218218
// log the event
219219
channels.log

test/tests/Test__Auto.res

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,43 @@ open Test__Util
33

44
let run = normalization => {
55
Async.it("should be responded with correct responses 1", async () => {
6+
Js.Console.log("Test__Auto: Starting makeAndLoad")
7+
Js.Console.log("Test__Auto: About to call AgdaMode.makeAndLoad with Auto.agda")
68
let ctx = await AgdaMode.makeAndLoad("Auto.agda")
9+
Js.Console.log("Test__Auto: makeAndLoad completed successfully")
10+
Js.Console.log2("Test__Auto: makeAndLoad returned context with state:", ctx.state)
11+
switch ctx.state.agdaVersion {
12+
| Some(version) => Js.Console.log2("Test__Auto: Agda version:", version)
13+
| None => Js.Console.log("Test__Auto: No Agda version found")
14+
}
715

16+
Js.Console.log("Test__Auto: Looking for goal at index 0")
817
let responses = switch Goals.getGoalByIndex(ctx.state.goals, 0) {
918
| Some(goal) =>
19+
Js.Console.log("Test__Auto: Found goal, sending Auto request")
1020
await ctx.state->State__Connection.sendRequestAndCollectResponses(
1121
Request.Auto(normalization, goal),
1222
)
13-
| None => []
23+
| None =>
24+
Js.Console.log("Test__Auto: No goal found at index 0")
25+
[]
1426
}
27+
Js.Console.log("Test__Auto: Auto request completed")
1528

1629
let filteredResponses = responses->Array.filter(filteredResponse)
30+
Js.Console.log2("Test__Auto: Filtered response count:", Array.length(filteredResponses))
1731

1832
switch ctx.state.agdaVersion {
1933
| Some(version) =>
34+
Js.Console.log2("Test__Auto: Checking version >= 2.7.0 for version:", version)
2035
if Util.Version.gte(version, "2.7.0") {
36+
Js.Console.log("Test__Auto: Using >= 2.7.0 assertion")
2137
Assert.deepStrictEqual(
2238
filteredResponses,
2339
[GiveAction(0, GiveString("n")), InteractionPoints([1])],
2440
)
2541
} else {
42+
Js.Console.log("Test__Auto: Using < 2.7.0 assertion")
2643
Assert.deepStrictEqual(
2744
filteredResponses,
2845
[
@@ -34,6 +51,7 @@ let run = normalization => {
3451
}
3552
| None => Assert.fail("No Agda version found")
3653
}
54+
Js.Console.log("Test__Auto: Assertion completed successfully")
3755
})
3856

3957
Async.it("should be responded with correct responses 2", async () => {
@@ -71,7 +89,7 @@ let run = normalization => {
7189
})
7290
}
7391

74-
describe("agda-mode.auto", () => {
92+
describe_only("agda-mode.auto", () => {
7593
This.timeout(4000)
7694

7795
describe("AsIs", () => {

0 commit comments

Comments
 (0)