Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-2495

tests in cache booster fail if the JDG image needs to be downloaded first

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.6.0.Final
    • Component/s: examples
    • Labels:
      None

      Description

      The tests in the Cache booster sometimes fail like this:

      [ERROR] cacheShouldExpire(io.thorntail.example.OpenshiftIT)  Time elapsed: 3.265 s  <<< FAILURE!
      java.lang.AssertionError: 
      1 expectation failed.
      Expected status code <204> but was <500>.
      
              at io.thorntail.example.OpenshiftIT.clearCache(OpenshiftIT.java:137)
              at io.thorntail.example.OpenshiftIT.setup(OpenshiftIT.java:53)
      

      This only happens when the registry.access.redhat.com/jboss-datagrid-7/datagrid73-openshift image is not available in the cluster beforehand and needs to be downloaded. This means that the testing application is deployed before the cache server is deployed, and the call to clear the cache fails.

      This can be worked around by making the clearCache method loop until the "clear cache" API invocation succeeds. However, the ultimate cause is that the test doesn't wait until the cache server is ready. Waiting is typically done by Arquillian Cube automatically, but that doesn't work here. That's actually caused by a glaring omission of health checks in the cache server deployment. Adding health checks (as recommended by DataGrid documentation: https://access.redhat.com/documentation/en-us/red_hat_data_grid/7.3/html/red_hat_data_grid_for_openshift/os_reference#probes) seems to fix the test, as expected.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lthon Ladislav Thon
                Reporter:
                lthon Ladislav Thon
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: