Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1861

Test failure in exam regression tests : KarafWithBundleTest

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: karaf-tooling
    • Labels:
      None

      Description

      When running the tooling/exam/regression tests I get an exception in KarafWithBundleTest.

      It cant connect to the URL http://localhost:9080/test/services.

      I think there are two possible problems with the test.

      1. At least on my machine karaf needs quite some time to start. So we might have a timing issue between karaf startup and the url.getConnection timing out
      2. We might have a timing issue between the war feature start and the servlet activator that gets the httpservice.

        Activity

        Hide
        chris@die-schneider.net Christian Schneider added a comment -

        Seems to work reliably now. I would prefer to get rid of the sleep again though. Is it possible to signal from the ServiceTracker to the test that the servlet is installed?

        Show
        chris@die-schneider.net Christian Schneider added a comment - Seems to work reliably now. I would prefer to get rid of the sleep again though. Is it possible to signal from the ServiceTracker to the test that the servlet is installed?
        Hide
        achim_nierbeck Achim Nierbeck added a comment -

        yes, the http-service sents events when the servlets are registered and started, you can register a specialized webEventListener as done in pax-web:
        https://github.com/ops4j/org.ops4j.pax.web/blob/master/itest/src/test/java/org/ops4j/pax/web/itest/WarIntegrationTest.java#L152

        Show
        achim_nierbeck Achim Nierbeck added a comment - yes, the http-service sents events when the servlets are registered and started, you can register a specialized webEventListener as done in pax-web: https://github.com/ops4j/org.ops4j.pax.web/blob/master/itest/src/test/java/org/ops4j/pax/web/itest/WarIntegrationTest.java#L152

          People

          • Assignee:
            chris@die-schneider.net Christian Schneider
            Reporter:
            chris@die-schneider.net Christian Schneider
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development