reportportal/agent-java-karate

Got an error when running a scenario which called another scenario

Closed this issue · 1 comments

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