Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23865

Jenkins Jobs Hanging while running junit tests

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ant-plugin
    • None
    • Jboss server/Ant build/Junit test

      When jobs runs its building java classes and test classes. Test started running. After 19-20 min, its stuck always. When comment particular class, it's stuck again in another test class at same 19-20 min time.

          [JENKINS-23865] Jenkins Jobs Hanging while running junit tests

          Daniel Beck added a comment -

          What Jenkins version is this?

          Daniel Beck added a comment - What Jenkins version is this?

          Easwar Muthu added a comment -

          Yes, outside jenkins we are able to run build and test perfectly. We use to face issue within jenkins only. And one more observation, i am wondering this time mannered stuck. After 19-20 min build and test run, it's stuck. Irrespective of package and test classes its stopping. I have verified space and memory and cpu usage all, seems all fine. If any external cause it should not allow to build or run tests,but in this case no issue for this at beginning. It's stop at 20th minutes.

          Jenkin version:jenkins-1.442

          Easwar Muthu added a comment - Yes, outside jenkins we are able to run build and test perfectly. We use to face issue within jenkins only. And one more observation, i am wondering this time mannered stuck. After 19-20 min build and test run, it's stuck. Irrespective of package and test classes its stopping. I have verified space and memory and cpu usage all, seems all fine. If any external cause it should not allow to build or run tests,but in this case no issue for this at beginning. It's stop at 20th minutes. Jenkin version:jenkins-1.442

          Easwar Muthu added a comment -

          Is it version upgrade required?

          Easwar Muthu added a comment - Is it version upgrade required?

          George Kraft added a comment - - edited

          We are having a similar issue running our Android Robolectric junit tests on a Jenkins (Windows) v1.651.1 server. Our tests randomly hang, then get timed out and aborted more often than not. Our Robolectric junits seem to run fine in Android Studio on our laptops (ie., Linux, OS X).

          SOLUTION: The fix for my issue was to rebase Jenkins on a Fedora Linux machine instead of using Microsoft Windows.

          George Kraft added a comment - - edited We are having a similar issue running our Android Robolectric junit tests on a Jenkins (Windows) v1.651.1 server. Our tests randomly hang, then get timed out and aborted more often than not. Our Robolectric junits seem to run fine in Android Studio on our laptops (ie., Linux, OS X). SOLUTION: The fix for my issue was to rebase Jenkins on a Fedora Linux machine instead of using Microsoft Windows.

          pankaj bisht added a comment -

          We also seem to be stuck with this same issue.

          • We are using Jenkins to run our tests which are written in Robot Framework. When Jenkins executes web based tests (using remote webdriver/grid) , it often hangs forever after executing a few tests. And we need to abort it to stop the job. But, when we run the same tests on the same slave with the same environment(without Jenkins), then all the tests run smoothly.
          • As an observation, when it gets stuck, I see (on remote test machine) that the browser remains kind of freezed on last opened web page(during test) as if waiting for the next instruction.

          Also, please let me know if I need to post threaddump logs here. Any help would be greatly appreciated.

          Jenkins Version : 1.651.1 (Scientific Linux 6.7)

          pankaj bisht added a comment - We also seem to be stuck with this same issue. We are using Jenkins to run our tests which are written in Robot Framework. When Jenkins executes web based tests (using remote webdriver/grid) , it often hangs forever after executing a few tests. And we need to abort it to stop the job. But, when we run the same tests on the same slave with the same environment(without Jenkins), then all the tests run smoothly. As an observation, when it gets stuck, I see (on remote test machine) that the browser remains kind of freezed on last opened web page(during test) as if waiting for the next instruction. Also, please let me know if I need to post threaddump logs here. Any help would be greatly appreciated. Jenkins Version : 1.651.1 (Scientific Linux 6.7)

          pankaj bisht added a comment -

          Still waiting for any help on this issue. Or is there any work around like upgrading Jenkins etc?

          pankaj bisht added a comment - Still waiting for any help on this issue. Or is there any work around like upgrading Jenkins etc?

          pankaj bisht added a comment -

          @George Kraft :

          Could you please provide following info :

          • which Fedora and Jenkins version you are using ?
          • You have used Fedora machine only for Master Jenkins or slave VMs as well?

          Thanks in advance.

          pankaj bisht added a comment - @George Kraft : Could you please provide following info : which Fedora and Jenkins version you are using ? You have used Fedora machine only for Master Jenkins or slave VMs as well? Thanks in advance.

          Hi All,

          I am also facing this issue on my Selenium test cases. My application works on JBOSS server. Jenkins v1.559 is running on windows machine. The selenium tests use Junit with ANT. I have a suite of around 1500 tests. The script gets stucks randomly on any test case and times out. If this issue is in Jenkins, could this please be escalated. Please let us know any workaround if available.

          Lokesh Pathrabe added a comment - Hi All, I am also facing this issue on my Selenium test cases. My application works on JBOSS server. Jenkins v1.559 is running on windows machine. The selenium tests use Junit with ANT. I have a suite of around 1500 tests. The script gets stucks randomly on any test case and times out. If this issue is in Jenkins, could this please be escalated. Please let us know any workaround if available.

          pankaj bisht added a comment -

          Our issue got resolved without having to change the OS. We found that one java process was apparently dying out during the execution (leading to the communication issues with the remote host), so that seemed to create the issue. So after handling that, stuck issue no more there.

          pankaj bisht added a comment - Our issue got resolved without having to change the OS. We found that one java process was apparently dying out during the execution (leading to the communication issues with the remote host), so that seemed to create the issue. So after handling that, stuck issue no more there.

          Burak added a comment -

          Hi pankajbisht700,

          I am having the same issue exactly. It has been a while since you have post this. Do you remember how exactly handle the stuck problem in the code?

          Thanks for your help in advance.

          Best regards,

          Burak D.

          Burak added a comment - Hi  pankajbisht700 , I am having the same issue exactly. It has been a while since you have post this. Do you remember how exactly handle the stuck problem in the code? Thanks for your help in advance. Best regards, Burak D.

            Unassigned Unassigned
            kmeaswar Easwar Muthu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: