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

Got an error when running a scenario which called another scenario #32

Open
daogudeshitai opened this issue Apr 23, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@daogudeshitai
Copy link

Describe the bug
A clear and concise description of what the bug is.
When I run a scenario which call another scenario, I got below error:

  • call read('@remove-user-then-delete-team') { toDeleteId: '#(toDeleteId)' }
    Cannot invoke "com.epam.reportportal.karate.utils.BlockingConcurrentHashMap$BlockingReference.get(long, java.util.concurrent.TimeUnit)" because the return value of "java.util.Map.remove(Object)" is null

And it runs with no problem after I remove .hook(new ReportPortalHook())

Steps to Reproduce
Steps to reproduce the behavior:

  1. write a test case which will call another scenario
    for example
Scenario: delete a team having members
    # create a team
    * def name = 'team'
    * path 'teams'
    * request { name: "#(name)", description: "auto test"}
    * method post
    * status 200
    * match response.data contains { id: '#string', name: '#(name)', description: 'auto test' }
    * def toDeleteId = response.data.id

    * call read('@remove-user-then-delete-team') { toDeleteId: '#(toDeleteId)' }

@ignore @remove-user-then-delete-team
  Scenario: remove team users and then delete a team
    # get team member
    * path 'teams', toDeleteId, 'members'
    * method get
    * status 200
    * def memberId = response.data.data[0].id

    # remove member
    * path 'teams', toDeleteId, 'members', memberId
    * method delete
    * status 200

    # delete a team
  1. Use hook to run the test

Expected behavior
The test is runned successfully.

Actual behavior
Got an error when running.

  • call read('@remove-user-then-delete-team') { toDeleteId: '#(toDeleteId)' }
    Cannot invoke "com.epam.reportportal.karate.utils.BlockingConcurrentHashMap$BlockingReference.get(long, java.util.concurrent.TimeUnit)" because the return value of "java.util.Map.remove(Object)" is null

Dependency versions
agent-java-karate 5.0.4

Additional context
N/A

@daogudeshitai daogudeshitai added the bug Something isn't working label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant