Skip to content
Snippets Groups Projects
Commit 1dcdc57f authored by Michael Hamann's avatar Michael Hamann
Browse files

[Misc] Adapt test for Java 11

parent 1b39f8e4
No related branches found
No related tags found
No related merge requests found
...@@ -49,17 +49,16 @@ void testTimeoutReporting(TestUtils testUtils, TestReference testReference) ...@@ -49,17 +49,16 @@ void testTimeoutReporting(TestUtils testUtils, TestReference testReference)
// Reduce the timeout to make the test faster. // Reduce the timeout to make the test faster.
testUtils.getDriver().setTimeout(5); testUtils.getDriver().setTimeout(5);
TimeoutException exception = TimeoutException exception =
assertThrows(TimeoutException.class, () -> testUtils.createPage(testReference, """ assertThrows(TimeoutException.class, () -> testUtils.createPage(testReference,
{{html clean="false"}} "{{html clean=\"false\"}}\n"
<script> + "<script>\n"
require(['xwiki-page-ready'], function(pageReady) { + "require(['xwiki-page-ready'], function(pageReady) {\n"
pageReady.delayPageReady(new Promise((resolve, reject) => { + " pageReady.delayPageReady(new Promise((resolve, reject) => {\n"
// Intentionally don't resolve or reject the promise to make the pageReady wait fail. + " // Intentionally don't resolve or reject the promise to make the pageReady wait fail.\n"
}), 'testing pageReady'); + " }), 'testing pageReady');\n"
}); + "});\n"
</script> + "</script>\n"
{{/html}} + "{{/html}}"));
"""));
// Verify that we got the pending delay in the message. We don't care for this test if there were any // Verify that we got the pending delay in the message. We don't care for this test if there were any
// other pending delays. // other pending delays.
assertThat(exception.getMessage(), containsString("testing pageReady")); assertThat(exception.getMessage(), containsString("testing pageReady"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment