Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8000756

TEST_BUG: RegTest-test javax/swing/JPopupMenu/PopupTest/MenuTester.java fails

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • Verification:
      Fix failed

      Description



      Name: mmR10223 Date: 05/21/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b06 (the test fails with previous builds due to the bug 4847024 )
      Testbase : RegTest-test
      Platform[s] : Windows XP Pro
      switch/Mode : default
      Falling test[s]:
              javax/swing/JPopupMenu/PopupTest/MenuTester.java

      RegTest-test javax/swing/JPopupMenu/PopupTest/MenuTester.java test fails on JDK1.5.0-b06 on Windows XP .

      I am not able to reproduce the failure on Solaris and Linux systems.
      It seems the test fails because MenuTester class works with Robot incorrectly.

      Here is code fragment from the test source:

      ------ javax/swing/JPopupMenu/PopupTest/Robot.java ------
      ...
          public void moveMouseTo(Component c) {
              Log.msg("> mouse moved to ", c);
              super.moveMouseTo(c);
          }

          public void clickMouse(int buttons) {
              Log.msg("> mouse click ");
              super.clickMouse(buttons);
          }
      ...

      The test stable passes if I change this code by the following way:

      ------ javax/swing/JPopupMenu/PopupTest/Robot.java ------
      ...
      ***************
      *** 43,53 ****
      --- 43,55 ----
        
            public void moveMouseTo(Component c) {
                Log.msg("> mouse moved to ", c);
      + super.delay();
                super.moveMouseTo(c);
            }
        
            public void clickMouse(int buttons) {
                Log.msg("> mouse click ");
      + super.delay();
                super.clickMouse(buttons);
            }
        }

      ...

      Please, note that this is not the same issue as bug 4847024: While this bug is not fixed,
      the test failed on all platforms with JDK1.5.0 builds (b05, b04).
      Please, see also bug 4847024 Evaluation for more detailes.



      Test source location:
      =====================
      /java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/javax/swing/JPopupMenu/PopupTest/MenuTester.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/tiger/b06/regtest/win32/winXP_PRO_-server_smp_linux-16/workDir/test/javax/swing/JPopupMenu/PopupTest/MenuTester.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables)
       
      --- script start ---
      #!/bin/sh

      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir
      JT_HOME="h:/java/jct"
      JAVA_HOME="h:/java/jdk1.5.0/win32"
      TEST_BASE_PATH="h:/java/regtest/test"

      TESTWITH=$JAVA_HOME
      TESTJAVA=$JAVA_HOME

      JTOPTS="-server"
      TESTVMOPTS="-server"

      CLASSPATH="$JT_HOME/classes;$JT_HOME/lib/javatest.jar;$JT_HOME/lib/jtreg.jar;$JT_HOME/jemmy/jemmy.jar"

      export JAVA_HOME
      export JT_HOME
      export TESTWITH
      export CLASSPATH

      mkdir -p $WORK_DIR/scratch 2>&1
      mkdir -p $WORK_DIR/jtData 2>&1
      mkdir -p $REPORT_DIR 2>&1

      #rm $WORK_DIR/jtData/ResultCache.jtw 2>&1

      cd $WORK_DIR/scratch

      $JAVA_HOME/bin/java -cp $CLASSPATH $JTOPTS -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,windir=$windir,PATH=${SHELL%/*},CPAPPEND=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-16" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/javax/swing/JPopupMenu/PopupTest/MenuTester.java"

      --- script end ---

      Script output:
      ==============

      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(0/0)----------
      result: Passed. Compilation successful

      #section:build
      ----------messages:(3/97)----------
      command: build MenuTester
      reason: Named class compiled on demand
      elapsed time (seconds): 0.0
      result: Passed. No need to compile: MenuTester.java

      #section:main
      ----------messages:(3/123)----------
      command: main MenuTester
      reason: User specified action: run main/timeout=900 MenuTester
      elapsed time (seconds): 18.626
      ----------System.out:(0/0)----------
      ----------System.err:(51/2009)----------
      Menu testing starts
      --- Running tcEmptyMenu
      > hit key F10
      ERROR: Test failed with TestFailedException: Empty isn't selected at
      --- Running tc4213634
      > hit key Alt-M
      ERROR: Test failed with TestFailedException: Menu isn't visible at
      --- Running tc4503016
      > hit key Alt-2
      > hit key Down
      > hit key Right
      > hit key Down
      ERROR: Test failed with TestFailedException: Item 2 isn't selected at
      --- Running tcWin2kAltTest
      > hit key Alt-Alt
      ERROR: Test failed with TestFailedException: Menu 1 isn't selected at
      --- Running tc4730233
      > mouse moved to Pets
      > mouse click
      ERROR: Test failed with TestFailedException: Pets isn't visible at
      --- Running tcDuplicateMnemonics
      > hit key Alt-E
      > hit key C
      ERROR: Test failed with TestFailedException: Copy isn't selected at
      Testing finished
      The following testcases failed:
        tcEmptyMenu
        tc4213634
        tc4503016
        tcWin2kAltTest
        tc4730233
        tcDuplicateMnemonics
      To rerun failed testcases, run:
      java MenuTester tcEmptyMenu tc4213634 tc4503016 tcWin2kAltTest tc4730233 tcDuplicateMnemonics
      To rerun failed testcases, run:
      java MenuTester tcEmptyMenu tc4213634 tc4503016 tcWin2kAltTest tc4730233 tcDuplicateMnemonics
      java.lang.RuntimeException: Some test cases failed
      at MenuTester.report(MenuTester.java:476)
      at MenuTester.test(MenuTester.java:445)
      at MenuTester.main(MenuTester.java:481)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
      at java.lang.Thread.run(Thread.java:534)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Some test cases failed
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Some test cases failed
      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Some test cases failed


      test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Some test cases failed


      Specific machine info:
      ======================
      Hostname: linux-16
      OS: Windows XP Pro


      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                robm Robert Mckenna
                Reporter:
                mmvsunw Mmv Mmv (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: