JDK-8213135 : HTMLEditorTest.checkStyleProperty fails intermittently
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: openjfx12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2018-10-30
  • Updated: 2021-02-23
  • Resolved: 2018-11-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx11.0.11Fixed
Related Reports
Relates :  
Relates :  
Description
java.lang.AssertionError: check Style Property with removeFormat 
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.assertTrue(Assert.java:43)
	at test.javafx.scene.web.HTMLEditorTest.checkStyleProperty(HTMLEditorTest.java:327)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:106)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
	at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
	at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.base/java.lang.Thread.run(Thread.java:834)

Comments
Changeset: cc9e1b1af0b2 Author: arajkumar Date: 2018-11-08 11:48 +0530 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/cc9e1b1af0b2 8213135: HTMLEditorTest.checkStyleProperty fails intermittently Reviewed-by: kcr, mbilla ! build.gradle ! tests/system/src/test/java/test/javafx/scene/web/HTMLEditorTest.java ! tests/system/src/test/java/test/util/Util.java
08-11-2018

Thanks [~kcr]. Filed a bug(JDK-8213539) to revert the unintended change to build.gradle.
08-11-2018

I think as per policy, we should not use the same JBS id again.. You can close JDK-8213135 with http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/cc9e1b1af0b2 I think better create a new bug to revert this changeset and create another bug to push the changeset for JDK-8213135
08-11-2018

I guess it is better to revert the changeset(with a new bug) & push the reviewed changeset with this bug(JDK-8213135).
08-11-2018

Oops! Unintentionally committed a change to `build.gradle` which I added for testing. Shall I revert this changeset?
08-11-2018

I dont see below change in webrev http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/cc9e1b1af0b2 --- a/build.gradle Wed Nov 07 11:46:17 2018 -0800 +++ b/build.gradle Thu Nov 08 11:48:57 2018 +0530 testLogging { + showStandardStreams = true + }
08-11-2018

Another option: create a new bug to revert the unintended changes to build.gradle.
08-11-2018

+1 with below nit: You can remove the below unused import from HTMLEditorTest.java import static junit.framework.TestCase.fail; Also is the extra space at the end of all assert statements intentional? If not required, u can remove that space..
07-11-2018

+1
01-11-2018

Root cause: WebView Load workers's state change notification received for the default page of HTMLEditor, not for the html doc which loaded using setHtmlText. The erroneous notification caused assertion check on invalid html document. The problem is not just specific to `checkStyleProperty`, it is applicable for all of the tests present in HTMLEditorTest. Proposed solution: Cancel the default page load before attaching the loader state change observer. Webrev: http://cr.openjdk.java.net/~arajkumar/8213135/webrev/ Changes made, 1. cancel the default page load of HTMLEditor before loading test page (for all tests in HTMLEditorTest) 2. Moved common test object initialisation to separate method using junit @Before 3. Added helper method in Util.java to wait for the latch to complete.
31-10-2018

As mentioned offline, adding "-PBUILD_SDK_FOR_TEST=false" to the above gradle command will speed up multiple runs of the test.
30-10-2018

I could reproduce this failure when running it multiple times, while [ 1 ]; do gradle -PCOMPILE_WEBKIT=true -PCOMPILE_MEDIA=true -PBUILD_LIBAV_STUBS=true -PSTUB_RUNTIME= -PFULL_TEST=true -PUSE_ROBOT=true cleanTest :systemTest:test --tests test.javafx.scene.web.HTMLEditorTest; done
30-10-2018