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

jdk/jshell/CommandCompletionTest.java fails with "lists don't have the same size expected [2] but found [1]"

    XMLWordPrintable

Details

    • b24
    • x86_64, aarch64
    • linux

    Description

      The following test failed in the JDK20 CI:

      jdk/jshell/CommandCompletionTest.java

      Here's a snippet from the log file:

      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(): failure
      java.lang.AssertionError: Command: /set editor |, output: [/]: lists don't have the same size expected [2] but found [1]
      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:89)
      at CommandCompletionTest.assertCompletion(CommandCompletionTest.java:83)
      at CommandCompletionTest.lambda$testSet$102(CommandCompletionTest.java:392)
      at ReplToolTesting$PromptedCommandOutputStream.write(ReplToolTesting.java:824)
      at java.base/java.io.PrintStream.implWrite(PrintStream.java:597)
      at java.base/java.io.PrintStream.write(PrintStream.java:577)
      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:313)
      at java.base/sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:409)
      at java.base/sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:414)
      at java.base/sun.nio.cs.StreamEncoder.lockedFlush(StreamEncoder.java:218)
      at java.base/sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:205)
      at java.base/java.io.OutputStreamWriter.flush(OutputStreamWriter.java:263)
      at java.base/java.io.PrintWriter.implFlush(PrintWriter.java:417)
      at java.base/java.io.PrintWriter.flush(PrintWriter.java:409)
      at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractTerminal.flush(AbstractTerminal.java:177)
      at jdk.internal.le/jdk.internal.org.jline.utils.Display.update(Display.java:340)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3924)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:3784)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:640)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:468)
      at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.readLine(ConsoleIOContext.java:223)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.getInput(JShellTool.java:1280)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1214)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:1000)
      at CommandCompletionTest.testRawRun(CommandCompletionTest.java:73)
      at ReplToolTesting.testRaw(ReplToolTesting.java:296)
      at ReplToolTesting.test(ReplToolTesting.java:249)
      at ReplToolTesting.test(ReplToolTesting.java:233)
      at CommandCompletionTest.testSet(CommandCompletionTest.java:386)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      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:93)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:1591)
      config ReplToolTesting.setUp(): success
      test CommandCompletionTest.testUserHome(): skip
      org.testng.SkipException: No suitable file(s) found for this test in /opt/mach5
      at CommandCompletionTest.testUserHome(CommandCompletionTest.java:363)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      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:93)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:1591)
      config ReplToolTesting.setUp(): success
      test CommandCompletionTest.testVarsMethodsTypes(): success

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

      ----------System.err:(10/528)----------
      java.lang.Exception: failures: 1
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:95)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:1591)

      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


      This test also has a much older unresolved bug that describes
      two other failure modes:

      JDK-8148625 JShell tests: jdk/jshell/CommandCompletionTest.java test fails

      Attachments

        Issue Links

          Activity

            People

              asotona Adam Sotona
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: