Camel
  1. Camel
  2. CAMEL-4924

Update mina2 component to not write the minaport.txt file in unit tests

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.10.0
    • Component/s: camel-mina2
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Build 203 on windows failed because the org.apache.camel.component.mina2.Mina2TcpWithInOutUsingPlainSocketTest hangs. I couldn't reproduce it on my Mac, but I found a none necessary code sniped which may is the reason for this. May it fix the problem...

      See for the build failure: https://builds.apache.org/view/A-F/view/Camel/job/Camel.trunk.fulltest.windows/203/console

      1. jconsole.jpg
        196 kB
        Babak Vahdat

        Issue Links

          Activity

          Hide
          Christian Müller added a comment -

          I will also remove the dependency to camel-properties because it's not needed and complicated the tests.

          Show
          Christian Müller added a comment - I will also remove the dependency to camel-properties because it's not needed and complicated the tests.
          Hide
          Babak Vahdat added a comment -

          I also can't reproduce the test failure on Mac but on Windows-Vista! I've already mentioned this fact to Claus by CAMEL-4899.

          Show
          Babak Vahdat added a comment - I also can't reproduce the test failure on Mac but on Windows-Vista! I've already mentioned this fact to Claus by CAMEL-4899 .
          Hide
          Babak Vahdat added a comment -

          And after the failure on

          org.apache.camel.component.mina2.Mina2TcpWithInOutTest
          

          The Maven JVM process simply hangs indefinitely!

          Show
          Babak Vahdat added a comment - And after the failure on org.apache.camel.component.mina2.Mina2TcpWithInOutTest The Maven JVM process simply hangs indefinitely!
          Hide
          Babak Vahdat added a comment -

          I also attached the jconsole screenshot which exactly shows the thread-dump of the hanging thread by the testcase already mentioned.

          Show
          Babak Vahdat added a comment - I also attached the jconsole screenshot which exactly shows the thread-dump of the hanging thread by the testcase already mentioned.
          Hide
          Christian Müller added a comment -

          Committed r1233693

          Show
          Christian Müller added a comment - Committed r1233693
          Hide
          Christian Müller added a comment -

          Ok let's see whether this fix solved this issue or not.

          Show
          Christian Müller added a comment - Ok let's see whether this fix solved this issue or not.
          Hide
          Babak Vahdat added a comment - - edited

          Even with r1233693 in place it's still hanging on my Windows-Vista box

          Show
          Babak Vahdat added a comment - - edited Even with r1233693 in place it's still hanging on my Windows-Vista box
          Hide
          Christian Müller added a comment -

          The same on my Windows 7 box. Mina2TcpWithInOutTest fails before. May this is the reason. I will look into it...

          Show
          Christian Müller added a comment - The same on my Windows 7 box. Mina2TcpWithInOutTest fails before. May this is the reason. I will look into it...
          Hide
          Babak Vahdat added a comment - - edited

          Exactly!
          Mina2TcpWithInOutTest seems to be the root cause of the problem, causing the VM to hang. I assume as it's side effect (see by the attached screenshot) the thread running Mina2TcpWithInOutUsingPlainSocketTest test methods afterwards then becomes hanging.

          Pressing the "Detect Deadlocks" button on Windows Vista didn't report any potential deadlock by me.

          Show
          Babak Vahdat added a comment - - edited Exactly! Mina2TcpWithInOutTest seems to be the root cause of the problem, causing the VM to hang. I assume as it's side effect (see by the attached screenshot) the thread running Mina2TcpWithInOutUsingPlainSocketTest test methods afterwards then becomes hanging. Pressing the "Detect Deadlocks" button on Windows Vista didn't report any potential deadlock by me.
          Hide
          Babak Vahdat added a comment -

          Christian, just to make sure that no revision on the camel-mina2 component has broken any regression, I reverted it to the first revision [1] by my workspace on Windows. Result: Running tests still hangs the VM at the same place:

          ...
          Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 16.875 sec <<< FAILURE!
          Running org.apache.camel.component.mina2.Mina2TcpWithInOutUsingPlainSocketTest
          ...
          

          So at least by now we know that those revisions on this components have not broken anything!

          [1] http://svn.apache.org/viewvc?view=revision&revision=1226449

          Show
          Babak Vahdat added a comment - Christian, just to make sure that no revision on the camel-mina2 component has broken any regression, I reverted it to the first revision [1] by my workspace on Windows . Result: Running tests still hangs the VM at the same place: ... Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 16.875 sec <<< FAILURE! Running org.apache.camel.component.mina2.Mina2TcpWithInOutUsingPlainSocketTest ... So at least by now we know that those revisions on this components have not broken anything! [1] http://svn.apache.org/viewvc?view=revision&revision=1226449
          Hide
          Babak Vahdat added a comment -

          Christian,

          I checked in the revision [1] which now makes ALL tests to pass on Windows as well. I'll keep an eye on the next Windows build by the CI-Servers.

          [1] http://svn.apache.org/viewvc?view=revision&revision=1234489

          Show
          Babak Vahdat added a comment - Christian, I checked in the revision [1] which now makes ALL tests to pass on Windows as well. I'll keep an eye on the next Windows build by the CI-Servers. [1] http://svn.apache.org/viewvc?view=revision&revision=1234489
          Hide
          Christian Müller added a comment -

          Great Babak! Test test now also pass on my Windows 7 box.
          Because the two last build aborted in camel-jms, I started it manually now again. I will also have an eye on it and close this issue...

          Thanks,
          Christian

          Show
          Christian Müller added a comment - Great Babak! Test test now also pass on my Windows 7 box. Because the two last build aborted in camel-jms, I started it manually now again. I will also have an eye on it and close this issue... Thanks, Christian
          Hide
          Babak Vahdat added a comment -

          They did indeed all past now by the newest build on Windows:

          https://builds.apache.org/job/Camel.trunk.fulltest.windows/215/org.apache.camel$camel-mina2/

          Show
          Babak Vahdat added a comment - They did indeed all past now by the newest build on Windows: https://builds.apache.org/job/Camel.trunk.fulltest.windows/215/org.apache.camel$camel-mina2/

            People

            • Assignee:
              Christian Müller
              Reporter:
              Christian Müller
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development