Skip to content

Commit 0784bce

Browse files
committed
test: Fix -jar test when running directly with Java 25
1 parent 06ea88e commit 0784bce

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

spec/warbler/bundler_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ def bundle_install(*args)
226226

227227
it "can run commands in the generated warfile" do
228228
jar.create('foo.war')
229-
stdin, stdout, stderr, wait_thr = Open3.popen3('java -jar foo.war -S rake test_task')
229+
_, stdout, stderr, wait_thr = Open3.popen3(
230+
'java ' \
231+
'--enable-native-access=ALL-UNNAMED --sun-misc-unsafe-memory-access=allow -XX:+IgnoreUnrecognizedVMOptions ' \
232+
'-jar foo.war -S rake test_task'
233+
)
230234
expect(stderr.readlines.join).to eq("")
231235
expect(wait_thr.value.success?).to be(true)
232236
expect(stdout.readlines.join).to eq("success\n")

0 commit comments

Comments
 (0)