Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-863

Kie WB REST getJob randomly return 410 Gone after previous REST call

XMLWordPrintable

    • CR2
    • CR2
    • Hide

      Execute kie-wb-tests-rest with production binaries.

      Show
      Execute kie-wb-tests-rest with production binaries.

      When is send REST call to WB which create a job (e.g. compile, deploy or delete) and after the creation we try to get the job status, then the REST call for get Job return http code 410 and status GONE.
      This is probably caused because job is null. see REST backend
      If we try to get job after it's creation it shouldn't be null.

      This issue was found by kie-wb-tests-rest with prod binaries, this issue didn't happened with community binaries. The GONE status is returned from get job randomly in different test scenarios (sometimes all tests pass). I extend client for testing to get better output when is returned exception with GONE status. commit in test fork

      I add to the client check of the job id from first call. see here Job id is not null or empty so we should be able to get job status. I also try to get job status again after the first failure and it returned expected status ACCEPTED or APPROVED get job status again.

      Test output:

       >>> testCompileProject <<< 
      null
      GONE
          
      APPROVED
      1524660988078-15
      [2018-04-25 08:56:28,086] ERROR-   Unexpected job result after waiting 0 seconds for job to succeed
      0 APPROVED
      0 null
      1 APPROVED
      1 null
      2 APPROVED
      2 null
      3 APPROVED
      3 null
      4 APPROVED
      4 null
      

      Stack trace:

      org.kie.wb.test.rest.client.NotSuccessException: GONE: null
      	at org.kie.wb.test.rest.client.RestWorkbenchClient.waitUntilJobFinished(RestWorkbenchClient.java:336)
      	at org.kie.wb.test.rest.client.RestWorkbenchClient.createProject(RestWorkbenchClient.java:175)
      	at org.kie.wb.test.rest.functional.ProjectIntegrationTest.createProject(ProjectIntegrationTest.java:240)
      	at org.kie.wb.test.rest.functional.ProjectIntegrationTest.testCompileProject(ProjectIntegrationTest.java:136)
      

              trikkola Toni Rikkola
              jakubschwan Jakub Schwan
              Jakub Schwan Jakub Schwan
              Jakub Schwan Jakub Schwan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: