java.lang.AssertionError: Command: /retain editor |, output: [C:\\, D:\\, E:\\, G:\\]: lists don't have the same size expected [5] but found [4]

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • langtools\test\jdk\jshell\CommandCompletionTest.java fails on some windows machines. The 'retain editor |' test fails to pick up a dvd drive. A slightly edited ReplToolTesting.jjava shows the output below. This is from running the test on windows7 command line on a machine with a dvd rw, with simple jtreg call: sh jtreg -jdk:d:\jdk\9u135 -dir:d:\ws\b1082\langtools\test jdk/jshell/CommandCompletionTest.java Full jtr files (edited output and as is in openjdk) are attached. [DEBUG] assertCompletion(/retain editor |, false, [Ljava.lang.String;@1994520 [DEBUG] completion:C:\\ [DEBUG] completion:D:\\ [DEBUG] completion:E:\\ [DEBUG] completion:G:\\ [DEBUG] expected:C:\\ [DEBUG] expected:D:\\ [DEBUG] expected:E:\\ [DEBUG] expected:F:\\ [DEBUG] expected:G:\\ test CommandCompletionTest.testRetain(): failure java.lang.AssertionError: Command: /retain editor |, output: [C:\\, D:\\, E:\\, G:\\]: lists don't have the same size expected [5] but found [4] at org.testng.Assert.fail(Assert.java:94) at org.testng.Assert.failNotEquals(Assert.java:496) at org.testng.Assert.assertEquals(Assert.java:125) at org.testng.Assert.assertEquals(Assert.java:372) at org.testng.Assert.assertEquals(Assert.java:539) at ReplToolTesting.assertCompletion(ReplToolTesting.java:464) at ReplToolTesting.assertCompletion(ReplToolTesting.java:453) at CommandCompletionTest.lambda$testRetain$49(CommandCompletionTest.java:209) at ReplToolTesting$PromptedCommandOutputStream.write(ReplToolTesting.java:770) at ReplToolTesting$PromptedCommandOutputStream.write(ReplToolTesting.java:786) at java.io.PrintStream.write(java.base@9-ea/PrintStream.java:480) at sun.nio.cs.StreamEncoder.writeBytes(java.base@9-ea/StreamEncoder.java:233) at sun.nio.cs.StreamEncoder.implFlushBuffer(java.base@9-ea/StreamEncoder.java:312) at sun.nio.cs.StreamEncoder.implFlush(java.base@9-ea/StreamEncoder.java:316) at sun.nio.cs.StreamEncoder.flush(java.base@9-ea/StreamEncoder.java:153) at java.io.OutputStreamWriter.flush(java.base@9-ea/OutputStreamWriter.java:256) at jdk.internal.jline.console.ConsoleReader.readLine(jdk.internal.le@9-ea/ConsoleReader.java:2337) at jdk.internal.jline.console.ConsoleReader.readLine(jdk.internal.le@9-ea/ConsoleReader.java:2278) at jdk.internal.jshell.tool.ConsoleIOContext.readLine(jdk.jshell@9-ea/ConsoleIOContext.java:179) at jdk.internal.jshell.tool.JShellTool.run(jdk.jshell@9-ea/JShellTool.java:790) at jdk.internal.jshell.tool.JShellTool.start(jdk.jshell@9-ea/JShellTool.java:538) at jdk.internal.jshell.tool.JShellTool.start(jdk.jshell@9-ea/JShellTool.java:491) at ReplToolTesting.testRaw(ReplToolTesting.java:256) at ReplToolTesting.test(ReplToolTesting.java:213) at ReplToolTesting.test(ReplToolTesting.java:201) at CommandCompletionTest.testRetain(CommandCompletionTest.java:203) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) at org.testng.TestNG.run(TestNG.java:1018) at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:220) at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:184) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-ea/Thread.java:843) This is from running the test on windows7 command line on a machine with a dvd rw. sh jtreg -jdk:d:\jdk\9u135 -dir:d:\ws\b1082\langtools\test jdk/jshell/CommandCompletionTest.java
    via by Steve Sides,
  • Test fails on jdk9 b132. config CompletionSuggestionTest.setUp(): success test CompletionSuggestionTest.testUncompletedDeclaration(): failure java.lang.AssertionError: Input: class Clazz { Clazz clazz; Object o = cla|, [class_path_test, clazz]: lists don't have the same size expected [1] but found [2] at org.testng.Assert.fail(Assert.java:94) at org.testng.Assert.failNotEquals(Assert.java:496) at org.testng.Assert.assertEquals(Assert.java:125) at org.testng.Assert.assertEquals(Assert.java:372) at org.testng.Assert.assertEquals(Assert.java:539) at KullaTesting.assertCompletion(KullaTesting.java:861) at KullaTesting.assertCompletion(KullaTesting.java:856) at CompletionSuggestionTest.testUncompletedDeclaration(CompletionSuggestionTest.java:422) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:773) at org.testng.TestRunner.run(TestRunner.java:623) at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) at org.testng.SuiteRunner.run(SuiteRunner.java:259) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185) at org.testng.TestNG.runSuitesLocally(TestNG.java:1110) at org.testng.TestNG.run(TestNG.java:1018) at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:220) at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:184) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-ea/Thread.java:843)
    via by Andrey Nazarov,
  • Build fails using JDK 8
    via GitHub by paulf
    ,
  • Test issues
    via GitHub by lokeshhctm
    ,
  • TestExchangeClient failures
    via GitHub by electrum
    ,
  • alwaysRun parameter in TestNG
    via Stack Overflow by Konrad Kaliściak
    ,
    • java.lang.AssertionError: Command: /retain editor |, output: [C:\\, D:\\, E:\\, G:\\]: lists don't have the same size expected [5] but found [4] at org.testng.Assert.fail(Assert.java:94) at org.testng.Assert.failNotEquals(Assert.java:496) at org.testng.Assert.assertEquals(Assert.java:125) at org.testng.Assert.assertEquals(Assert.java:372) at org.testng.Assert.assertEquals(Assert.java:539) at ReplToolTesting.assertCompletion(ReplToolTesting.java:464) at ReplToolTesting.assertCompletion(ReplToolTesting.java:453) at CommandCompletionTest.lambda$testRetain$49(CommandCompletionTest.java:209) at ReplToolTesting$PromptedCommandOutputStream.write(ReplToolTesting.java:770) at ReplToolTesting$PromptedCommandOutputStream.write(ReplToolTesting.java:786)

    Users with the same issue

    arturgajowy
    arturgajowy10 times, last one,
    Mark
    Mark3 times, last one,
    Nikolay Rybak
    Nikolay Rybak1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    13 more bugmates