Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-2571

Apex-pdp Web Socket server connection failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: Frankfurt Release
    • Fix Version/s: Frankfurt Release
    • Component/s: None
    • Labels:

      Description

      A Web Socket test intermittently fails in apex-pdp.

      In the Web Socket unit test, sometimes the server does not start quickly enough and is not available when the wek socket client connects. This review changes the unit test to wait for up to 2 seconds for the web socket server to come up.

       

      01:12:14 2020-05-15 00:12:14,387 Apex [main] WARN o.o.p.a.c.i.m.s.WsStringMessageClient - web socket event consumer client to "ws://localhost:44441" start failed
      01:12:14 java.lang.IllegalStateException: Could not connect to the server
      01:12:14 at org.onap.policy.apex.core.infrastructure.messaging.impl.ws.client.MessagingClient.startConnection(MessagingClient.java:89)
      01:12:14 at org.onap.policy.apex.core.infrastructure.messaging.stringmessaging.WsStringMessageClient.start(WsStringMessageClient.java:83)
      01:12:14 at org.onap.policy.apex.core.infrastructure.messaging.EndToEndStringMessagingTest.testEndToEndMessaging(EndToEndStringMessagingTest.java:61)
      01:12:14 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      01:12:14 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      01:12:14 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      01:12:14 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      01:12:14 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      01:12:14 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      01:12:14 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      01:12:14 at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      01:12:14 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      01:12:14 at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      01:12:14 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      01:12:14 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      01:12:14 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      01:12:14 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      01:12:14 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      01:12:14 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      01:12:14 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      01:12:14 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      01:12:14 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      01:12:14 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      01:12:14 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
      01:12:14 at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
      01:12:14 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
      01:12:14 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
      01:12:14 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
      01:12:14 at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
      01:12:14 at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
      01:12:14 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            liamfallon Liam Fallon
            Reporter:
            liamfallon Liam Fallon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: