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

TEST_BUG: RegTest-test bug4760494.java fails with 2-button mouses

    Details

    • Subcomponent:
    • Resolved In Build:
      b23
    • CPU:
      x86
    • OS:
      solaris_8
    • Verification:
      Verified

      Backports

        Description



        Name: asR10013 Date: 12/11/2002


        Filed By : J2SE-SQA [###@###.###
        JDK : JDK1.4.2-b09
        Testbase : RegTest-test
        Platform[s] : Solaris 8 (x86)
        switch/Mode : -client
        Falling test[s]:
                javax/swing/JPopupMenu/4760494/bug4760494.java

        Regression test javax/swing/JPopupMenu/4760494/bug4760494.java fails with 2-button mouses.
        The reason of the failure is that mouse events for robo.mouseRelease(InputEvent.BUTTON3_MASK)
        are not triggered in our configuration and the popup menu does not appear.
        It is rather difficult to adjust our hardware configuration for each particular test,
        so I have no choice but to file the bug and to suggest the following simple workarounds:

        1) Generate events for both BUTTON2 and BUTTON3 simultaneously:

        robo.mousePress(InputEvent.BUTTON2_MASK);
                robo.mousePress(InputEvent.BUTTON3_MASK);
                robo.mouseRelease(InputEvent.BUTTON2_MASK);
                robo.mouseRelease(InputEvent.BUTTON3_MASK);

        2) Generate mouse clicks for BUTTON2 and analyse getButton return instead of isPopupTrigger:

        if(e.getButton()==MouseEvent.BUTTON2){

        Both workarounds were tested with 2-button mouses as well as with 3-button mouses and the test
        passed.

        Undoubtedly, the author of the test can find more elegant solutions for the problem.

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

        jtr file location:
        ==================
        /net/jtgb4u4c.sfbay/export/sail15/results/mantis/b09/regtest/x86/s8_-client_linux-10/workDir/test/javax/swing/JPopupMenu/4760494/bug4760494.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="/net/linux-15/export/home/java/jct"
        JAVA_HOME="/net/linux-15/export/home/java/jdk1.4.2/x86"
        TEST_BASE_PATH="/net/linux-15/export/home/java/regtest/test"

        TESTWITH=$JAVA_HOME
        TESTJAVA=$JAVA_HOME

        JTOPTS="-client"
        TESTVMOPTS="-client"

        CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.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,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-10" -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/4760494/bug4760494.java"

        --- script end ---

        Test output (jtr part):
        =======================
        ----------System.out:(0/0)----------
        ----------System.err:(5/293)----------
        java.lang.RuntimeException: Test failed.
        at bug4760494.init(bug4760494.java:52)
        at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:132)
        at java.lang.Thread.run(Thread.java:536)
        STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: Test failed.
        result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: Test failed.


        test result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: Test failed.


        Specific machine info:
        ======================
        Hostname: linux-10
        OS: Solaris 8 (x86)



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

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  kizune Alexander Zuev
                  Reporter:
                  alssunw Als Als (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: