Uploaded image for project: 'AppFormer'
  1. AppFormer
  2. AF-1412

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • REST API
    • None
    • 2018 Week 33-35
    • Hide

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

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

      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
            trikkola Toni Rikkola
            Jakub Schwan Jakub Schwan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: