Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 550345 - [Tests] testBug545769_UTF8OutOdd fails on Windows
Summary: [Tests] testBug545769_UTF8OutOdd fails on Windows
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.13   Edit
Hardware: All Windows 7
: P3 normal (vote)
Target Milestone: 4.14 M1   Edit
Assignee: Paul Pazderski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 550834
Blocks: 545769
  Show dependency tree
 
Reported: 2019-08-22 13:58 EDT by Sarika Sinha CLA
Modified: 2019-10-09 02:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sarika Sinha CLA 2019-08-22 13:58:30 EDT
Wrong number of characters in console. expected:<21015> but was:<21152> 

junit.framework.AssertionFailedError: Wrong number of characters in console. expected:<21015> but was:<21152>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.Assert.assertEquals(Assert.java:234)
at junit.framework.TestCase.assertEquals(TestCase.java:401)
at org.eclipse.jdt.debug.tests.core.ConsoleTests.utf8OutputTest(ConsoleTests.java:298)
at org.eclipse.jdt.debug.tests.core.ConsoleTests.testBug545769_UTF8OutOdd(ConsoleTests.java:257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at org.eclipse.jdt.debug.tests.AbstractDebugTest.runBare(AbstractDebugTest.java:2614)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at org.eclipse.jdt.debug.tests.DebugSuite$1.run(DebugSuite.java:61)
at java.lang.Thread.run(Thread.java:748)

https://download.eclipse.org/eclipse/downloads/drops4/I20190821-1800/testresults/html/org.eclipse.jdt.debug.tests_ep413I-unit-win32-java8_win32.win32.x86_64_8.0.html
Comment 1 Sarika Sinha CLA 2019-08-22 13:59:39 EDT
@Paul, please look into it.
Comment 2 Paul Pazderski CLA 2019-08-22 15:15:28 EDT
I assume it is the same intermittent problem as bug 549168 but this time the test did not displayed the error message. The length of the error message which caused bug 549168 is almost equal to the difference reported by the failure here. (maybe I missed a white space character)

Will close it if the test is not failing again.
Comment 3 Paul Pazderski CLA 2019-08-30 05:56:00 EDT
From the recent builds it worked except for one build. I still believe it's https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6476706 so not eclipse.
Comment 4 Eclipse Genie CLA 2019-09-03 03:37:08 EDT
New Gerrit change created: https://git.eclipse.org/r/148754
Comment 5 Paul Pazderski CLA 2019-09-03 03:37:17 EDT
Test recently failed with another number of characters in console. Add some debug code to better see the problem.
Comment 8 Paul Pazderski CLA 2019-09-05 10:42:56 EDT
And there is still no system.
Last time failed testBug545769_UTF8InEven (bug 549168 comment 6)
This time failed testBug545769_UTF8InOdd

Will try to make the tests more stable.
Comment 9 Paul Pazderski CLA 2019-09-06 05:10:42 EDT
Finally found something for the failing input tests. There must be a race condition in InputStreamMonitor. With enough repetitions I could trigger the failure and in this case the InputStreamMonitor queue is not empty but the thread is blocked on waiting for more input.
Comment 11 Paul Pazderski CLA 2019-09-10 03:41:12 EDT
As I expected it is the JVM bug again. Since this test seems to be more prone to that error and the test does not depend on debug mode I will change it to run in RUN_MODE instead.

Below the console output for reference:
> !ENTRY org.eclipse.jdt.debug.tests 1 0 2019-09-10 00:28:33.143
> !MESSAGE [testBug545769_UTF8OutEven] setUp
> üüüüüüüüüüüüüüüüüü
> ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
> JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [util.c:840]
> 
> 
> !ENTRY org.eclipse.jdt.debug.tests 1 0 2019-09-10 00:28:33.945
> !MESSAGE [testBug545769_UTF8OutEven] tearDown
Comment 12 Eclipse Genie CLA 2019-09-10 04:15:46 EDT
New Gerrit change created: https://git.eclipse.org/r/149232
Comment 14 Paul Pazderski CLA 2019-09-11 02:41:43 EDT
Thanks Sarika for merging. With those changes the tests should be stable now. You can reopen if one of the UTF8 tests fails again.
Comment 15 Sarika Sinha CLA 2019-10-09 02:39:22 EDT
Tests are stable now.