"org.graalvm.polyglot.PolyglotException: not found" when running in parallel

See original GitHub issue

Minimal repro: zip attached

This project contains a shared feature, which defines which defines a javascript function:

  Scenario: shared functions
    * def greet = function(name) { return "hello " + name; }
    * print greet

There are then three “caller” features, each containing a “Background” that calls the “shared” feature:

  Background:
    * def functions = call read('classpath:/examples/utils/shared.feature')

Each caller than has five scenarios which call the function with a parameter and assert the result.

  Scenario: call 1-1

    * def greeting = call functions.greet "test11"
    * print greeting
    * match greeting == "hello test11"
	
  [repeats]

If I use Runner.path("classpath:/examples").parallel(1); then everything passes.

But with Runner.path("classpath:/examples").parallel(5); most of the scenarios pass, but some fail at the “Background” step:

classpath:examples/features/caller3.feature:4
* def functions = call read('classpath:/examples/utils/shared.feature')
>>>> js failed:
01: read('classpath:/examples/utils/shared.feature')
<<<<
org.graalvm.polyglot.PolyglotException: not found: /examples/utils/shared.feature
- com.intuit.karate.resource.ResourceUtils.getResource(ResourceUtils.java:118)
- com.intuit.karate.core.ScenarioFileReader.toResource(ScenarioFileReader.java:128)
- com.intuit.karate.core.ScenarioFileReader.readFile(ScenarioFileReader.java:63)
- com.intuit.karate.core.ScenarioEngine.lambda$new$0(ScenarioEngine.java:118)
- <js>.:program(Unnamed:1) 

I’m on: Karate 1.0.0 (this works on 0.9.6) Windows 10 Version 2004 19041.804 Java 11.0.9 (Oracle Corporation 11.0.9+7-LTS)

Gradle version 6.3 (though our very-not-minimal “real” project is using gradle wrapper 6.8.3 and has the same problem)

I run this with the command gradle build

This feels close enough to https://github.com/intuit/karate/issues/1515 to make me suspect they may be related, but the Exception and stack don’t match.

karate-parallel.zip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
gavl-cdlcommented, Mar 29, 2021

Yes, the full-fat “real” test pack has spring-boot in play.

I think I followed the local build steps correctly, and everything seems to pass (both the minimal-repro test included above, and our “real” test pack) with the development version. Thanks!

0reactions
ptrthomascommented, May 17, 2022

to everyone commenting here, please try and submit a sample project following the process. it isn’t too hard. I’m locking this thread now

Read more comments on GitHub >

github_iconTop Results From Across the Web

"org.graalvm.polyglot.PolyglotException: not found" when ...
PolyglotException : not found" when running in parallel #1532 ... The thing is that now all the errors start with the org.graalvm.polyglot.
Read more >
ReferenceError:` - after upgrading to karate 1.1.0.RC3 from ...
Getting `org.graalvm.polyglot.PolyglotException: ReferenceError:` - after upgrading to karate 1.1.0.RC3 from karate 0.9.5 [duplicate] · Ask ...
Read more >
PolyglotException (GraalVM SDK Java API Reference)
A polyglot exception represents errors that contain Graal guest languages on ... this error or null if no source location is available for...
Read more >
7 New Features in Karate Test Automation Version 1.0
Version 1.0 of the Karate Test Automation Framework is within reach. I checked out the new features, and here are my 7 key...
Read more >
graalvm/graal-core - Gitter
Exception in thread "main" org.graalvm.polyglot.PolyglotException: java.lang.SecurityException: Operation is not allowed for: /home/pierre/... at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found