-
-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Tests with without-library-and-huge-tests profile run for ~1h20m on a i5-3570 CPU without utilizing 100% CPU during tests, so there is room for improvement.
One such improvement is @HtmlUnitNYI with assertTitle, where test will not set the required title, but the assertTitle method will wait DEFAULT_WAIT_TIME for title (useless wait):
htmlunit/src/test/java/com/gargoylesoftware/htmlunit/WebDriverTestCase.java
Lines 1380 to 1395 in fb1edd2
| protected void assertTitle(final WebDriver webdriver, final String expected) throws Exception { | |
| final long maxWait = System.currentTimeMillis() + DEFAULT_WAIT_TIME; | |
| while (true) { | |
| try { | |
| assertEquals(expected, webdriver.getTitle()); | |
| return; | |
| } | |
| catch (final ComparisonFailure e) { | |
| if (System.currentTimeMillis() > maxWait) { | |
| throw e; | |
| } | |
| Thread.sleep(10); | |
| } | |
| } | |
| } |
Another possible source of idling is waiting for async alerts. I think a synchronous javascript computation approach would be better then running async and waiting for alerts.
Also, what about parallel tests?
Metadata
Metadata
Assignees
Labels
No labels