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

jdk/jshell/CommandCompletionTest.java fails with "lists don't have the same size expected"

    XMLWordPrintable

Details

    • b16
    • x86_64
    • linux

    Backports

      Description

        The following test failed in the JDK18 CI:

        jdk/jshell/CommandCompletionTest.java

        Here's a snippet from the log file:

        #section:testng
        ----------messages:(6/354)----------
        command: testng CommandCompletionTest
        reason: User specified action: run testng CommandCompletionTest
        Mode: agentvm
        Agent id: 7
        Additional exports to unnamed modules from @modules: jdk.compiler/com.sun.tools.javac.api jdk.compiler/com.sun.tools.javac.main jdk.jdeps/com.sun.tools.javap jdk.jshell/jdk.internal.jshell.tool
        elapsed time (seconds): 30.857
        ----------configuration:(20/2271)----------
        Boot Layer
          class path: /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6/1/bundles/jtreg-6+1.zip/jtreg/lib/javatest.jar
                      /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6/1/bundles/jtreg-6+1.zip/jtreg/lib/jtreg.jar
                      /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6/1/bundles/jtreg-6+1.zip/jtreg/lib/junit.jar
                      /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6/1/bundles/jtreg-6+1.zip/jtreg/lib/hamcrest.jar
                      /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6/1/bundles/jtreg-6+1.zip/jtreg/lib/testng.jar
                      /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6/1/bundles/jtreg-6+1.zip/jtreg/lib/jcommander.jar
                      /opt/mach5/mesos/work_dir/jib-master/install/jtreg/6/1/bundles/jtreg-6+1.zip/jtreg/lib/guice.jar
          patch: java.base /opt/mach5/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S13784/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/63caca6e-6b60-430c-8bea-2385244c0ee1/runs/874479a5-000d-4967-abb9-2b9bc757822f/testoutput/test-support/jtreg_open_test_langtools_tier1/patches/java.base

        Test Layer
          add exports: jdk.compiler/com.sun.tools.javac.api ALL-UNNAMED
                       jdk.compiler/com.sun.tools.javac.main ALL-UNNAMED
                       jdk.jdeps/com.sun.tools.javap ALL-UNNAMED
                       jdk.jshell/jdk.internal.jshell.tool ALL-UNNAMED
          class path: /opt/mach5/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S13784/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/63caca6e-6b60-430c-8bea-2385244c0ee1/runs/874479a5-000d-4967-abb9-2b9bc757822f/testoutput/test-support/jtreg_open_test_langtools_tier1/classes/2/jdk/jshell/CommandCompletionTest.d
                       /opt/mach5/mesos/work_dir/jib-master/install/jdk-18+8-325/src.full/open/test/langtools/jdk/jshell
                       /opt/mach5/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S13784/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/63caca6e-6b60-430c-8bea-2385244c0ee1/runs/874479a5-000d-4967-abb9-2b9bc757822f/testoutput/test-support/jtreg_open_test_langtools_tier1/classes/2/tools/lib
                       /opt/mach5/mesos/work_dir/jib-master/install/jdk-18+8-325/src.full/open/test/langtools/tools/lib

        ----------rerun:(29/6128)*----------

        <snip>

        ----------System.out:(103/6626)----------
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testClassPath(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testCommand(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testDrop(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testEdit(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testEnv(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testHelp(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testHistory(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testList(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testOpen(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testReload(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testReset(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testSave(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testSet(): success
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testUserHome(): failure
        java.lang.AssertionError: Command: /env --class-path ~/|, output: [.java/, .ssh/, mesos/]: lists don't have the same size expected [2] but found [3]
        at org.testng.Assert.fail(Assert.java:99)
        at org.testng.Assert.failNotEquals(Assert.java:1037)
        at org.testng.Assert.assertEqualsImpl(Assert.java:140)
        at org.testng.Assert.assertEquals(Assert.java:122)
        at org.testng.Assert.assertEquals(Assert.java:907)
        at org.testng.Assert.assertEquals(Assert.java:1089)
        at CommandCompletionTest.assertCompletion(CommandCompletionTest.java:86)
        at CommandCompletionTest.assertCompletion(CommandCompletionTest.java:80)
        at CommandCompletionTest.lambda$testUserHome$89(CommandCompletionTest.java:342)
        at ReplToolTesting$PromptedCommandOutputStream.write(ReplToolTesting.java:824)
        at java.base/java.io.PrintStream.write(PrintStream.java:535)
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.LineDisciplineTerminal.processOutputByte(LineDisciplineTerminal.java:253)
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.LineDisciplineTerminal$FilteringOutputStream.write(LineDisciplineTerminal.java:294)
        at java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)
        at java.base/sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:313)
        at java.base/sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:318)
        at java.base/sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:160)
        at java.base/java.io.OutputStreamWriter.flush(OutputStreamWriter.java:248)
        at java.base/java.io.PrintWriter.flush(PrintWriter.java:396)
        at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractTerminal.flush(AbstractTerminal.java:174)
        at jdk.internal.le/jdk.internal.org.jline.utils.Display.update(Display.java:336)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3943)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3803)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:626)
        at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:454)
        at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.readLine(ConsoleIOContext.java:248)
        at jdk.jshell/jdk.internal.jshell.tool.JShellTool.getInput(JShellTool.java:1275)
        at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1209)
        at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:995)
        at CommandCompletionTest.testRawRun(CommandCompletionTest.java:70)
        at ReplToolTesting.testRaw(ReplToolTesting.java:296)
        at ReplToolTesting.test(ReplToolTesting.java:249)
        at ReplToolTesting.testNoStartUp(ReplToolTesting.java:237)
        at CommandCompletionTest.testUserHome(CommandCompletionTest.java:341)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.testng.TestRunner.privateRun(TestRunner.java:764)
        at org.testng.TestRunner.run(TestRunner.java:585)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:833)
        config ReplToolTesting.setUp(): success
        test CommandCompletionTest.testVarsMethodsTypes(): success

        ===============================================
        jdk/jshell/CommandCompletionTest.java
        Total tests run: 15, Passes: 14, Failures: 1, Skips: 0
        ===============================================

        ----------System.err:(12/714)----------
        java.lang.Exception: failures: 1
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:833)

        JavaTest Message: Test threw exception: java.lang.Exception
        JavaTest Message: shutting down test

        result: Failed. Execution failed: `main' threw exception: java.lang.Exception: failures: 1

        Attachments

          Issue Links

            Activity

              People

                jlahoda Jan Lahoda
                dcubed Daniel Daugherty
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: