Skip to content

Commit

Permalink
Fix classpath for resource loading in InterruptionTest (#731)
Browse files Browse the repository at this point in the history
Originally reported in #535
  • Loading branch information
andreaTP authored Jan 10, 2025
1 parent adbb67e commit 3eea16b
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ public void shouldInterruptLoop() throws InterruptedException {
var instance =
Instance.builder(
Parser.parse(
ClassLoader.getSystemClassLoader()
.getResourceAsStream(
"compiled/infinite-loop.c.wasm")))
InterruptionTest.class.getResourceAsStream(
"/compiled/infinite-loop.c.wasm")))
.build();
var function = instance.export("run");
assertInterruption(function::apply);
Expand All @@ -30,8 +29,8 @@ public void shouldInterruptCall() throws InterruptedException {
var instance =
Instance.builder(
Parser.parse(
ClassLoader.getSystemClassLoader()
.getResourceAsStream("compiled/power.c.wasm")))
InterruptionTest.class.getResourceAsStream(
"/compiled/power.c.wasm")))
.build();
var function = instance.export("run");
assertInterruption(() -> function.apply(100));
Expand Down

0 comments on commit 3eea16b

Please sign in to comment.