Harmony
  1. Harmony
  2. HARMONY-2282

[classlib][drlvm][swing] intermittent failures of swing module tests

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Environment:
      Win XP, msvc, debug

      Description

      While running swing module tests in perTest mode iteratively 50 times on Win XP, I observed the following intermittent failures:

      1). javax.swing.SpinnerDateModelTest@testSpinnerDateModel failed 35 times out of 50 on svn=r476124:

      expected:<0> but was:<7>

      junit.framework.AssertionFailedError: expected:<0> but was:<7> at javax.swing.SpinnerDateModelTest.testSpinnerDateModel(SpinnerDateModelTest.java:59) at java.lang.reflect.VMReflection.invokeMethod(Native Method) at javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java) at javax.swing.BasicSwingTestCase.runBareImpl(BasicSwingTestCase.java) at javax.swing.BasicSwingTestCase$1.run(BasicSwingTestCase.java) at java.lang.Thread.run(Unknown Source)

      2). javax.swing.text.WrappedPlainView_SimpleTest 1 time of 50 on svn=r476124:

      junit.framework.AssertionFailedError: Timeout occurred

      3). javax.swing.Timer_MultithreadedTest@testIsRunning failed 1 time of 50 on svn=r476124:

      timer is running

      junit.framework.AssertionFailedError: timer is running at javax.swing.Timer_MultithreadedTest.testIsRunning(Timer_MultithreadedTest.java:317) at java.lang.reflect.VMReflection.invokeMethod(Native Method)

      I'll proceed with iterative test runs and update the list, if there are new failures.

      1. H2282-SpinnerDateModelTest.patch
        1 kB
        Alexey A. Ivanov
      2. H2282-SpinnerDateModelTest.patch
        1 kB
        Alexey A. Ivanov

        Issue Links

          Activity

          Hide
          Alexey A. Ivanov added a comment -

          The patch to SpinnerDateModelTest fixes the failure of the first test mentioned.
          To reproduce the problem, you can add the following lines:
          calendar.set(2006, 10, 26);
          model.setValue(calendar.getTime());

          right after
          Calendar calendar = new GregorianCalendar();

          in setUp().

          This will make now.getDay() return 6, whereas the next day of week has index of 0 (i.e. model.getDate.getDay() return 0 as expected).

          Also I've added @Override annotations and calls to super into setUp() and tearDown().

          Show
          Alexey A. Ivanov added a comment - The patch to SpinnerDateModelTest fixes the failure of the first test mentioned. To reproduce the problem, you can add the following lines: calendar.set(2006, 10, 26); model.setValue(calendar.getTime()); right after Calendar calendar = new GregorianCalendar(); in setUp(). This will make now.getDay() return 6, whereas the next day of week has index of 0 (i.e. model.getDate.getDay() return 0 as expected). Also I've added @Override annotations and calls to super into setUp() and tearDown().
          Hide
          Alexey A. Ivanov added a comment -

          The updated patch because of Nathan's reformatting of code at r479418.

          Show
          Alexey A. Ivanov added a comment - The updated patch because of Nathan's reformatting of code at r479418.
          Hide
          tatyana doubtsova added a comment -

          See also HARMONY-2438 regarding intermittent failures of swing module tests in once mode on IBM VME

          Show
          tatyana doubtsova added a comment - See also HARMONY-2438 regarding intermittent failures of swing module tests in once mode on IBM VME
          Hide
          Alexey A. Ivanov added a comment -

          See also HARMONY-2438 where you can find the fix for javax.swing.Timer_MultithreadedTest.

          Show
          Alexey A. Ivanov added a comment - See also HARMONY-2438 where you can find the fix for javax.swing.Timer_MultithreadedTest.
          Hide
          Andrey Pavlenko added a comment -

          Are the failures still reproducible?
          I can't reproduce all of them on a WinXP/1cpu system.

          Show
          Andrey Pavlenko added a comment - Are the failures still reproducible? I can't reproduce all of them on a WinXP/1cpu system.
          Hide
          Alexei Fedotov added a comment -

          Andrey,
          Shouldn't 2cpu system be used to check for thread safety issues?

          Show
          Alexei Fedotov added a comment - Andrey, Shouldn't 2cpu system be used to check for thread safety issues?

            People

            • Assignee:
              Unassigned
              Reporter:
              tatyana doubtsova
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development