Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues observed in " karate-junit5 " library when migrated from version 1.2.0 to 1.3.1 #2248

Closed
DRexDX opened this issue Jan 29, 2023 · 3 comments
Labels

Comments

@DRexDX
Copy link

DRexDX commented Jan 29, 2023

When I upgraded karate-junit5 library from 1.2.0 to 1.3.1, errors mentioned on below stackoverflow link occur.

stackoverflow link to issue: Link

Refer below attached zip file for working example.

karate-issue.zip

Steps to reproduce the issue:

  1. Extract above project and run Maven command: mvn clean test. All the scenarios will be executed properly as, karate-junit5 library version is set to 1.2.0
  2. Now change the karate library version to 1.3.1 and run the same maven command. Observe errors.

Note: These issues are present on 1.4.0.RC3 as well.

@ptrthomas
Copy link
Member

@DRexDX - first, I really appreciate the example, very few people actually do this as per the instructions.

the driver issue can be resolved by doing this:

var driver = karate.get('driver');

the reason it used to work is because we were re-initializing JS functions before entering a scenario. the long story is here: #2081

I also confirmed that with the above change, everything works fine in 1.4.0.RC3

as of now, we don't plan any more Java 8 releases, unless we get community help. this is also because there are so many vulnerabilities, refer: #2148 - hopefully, you can use that info to convince your team to move.

closing as wontfix

@DRexDX
Copy link
Author

DRexDX commented Jan 29, 2023

@ptrthomas Ok, thanks for the workaround. Any idea how to fix other two issues as mentioned below?

  1. " org.graalvm.polyglot.PolyglotException: TypeError: invokeMember (getDate) on java.util.LinkedHashMap@6a969fb8 failed due to: Unknown identifier: getDate "

  2. " org.graalvm.polyglot.PolyglotException: TypeError: invokeMember (sort) on java.util.ArrayList@ff6077 failed due to: Arity error - expected: 1 actual: 0 "

These are present in 1.4.0.RC3 as well.

@ptrthomas
Copy link
Member

@DRexDX no, at least when I run the code you submitted. everything runs with 1.4.0.RC3. so you must be missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants