Skip to content

Commit

Permalink
Chore: Change Jetty version to 9.4.38.v20210224 (#12252)
Browse files Browse the repository at this point in the history
* Update Jetty version to 9.4.38.v20210224

* Update tests
  • Loading branch information
tarekoraby committed Mar 24, 2021
1 parent 5a25266 commit 61df35a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
<!-- Dependency unpack directory -->
<dependency.unpack.directory>${project.build.directory}/dependency-unpack</dependency.unpack.directory>

<!-- Cannot use 9.3 or 9.4 because they sometimes reset the connection too early in case of errors -->
<jetty.version>9.4.14.v20181114</jetty.version>
<jetty.version>9.4.38.v20210224</jetty.version>
<phantomjs.version>2.1.1</phantomjs.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<failOnMissingWebXml>false</failOnMissingWebXml>
<jetty.version>9.3.7.v20160115</jetty.version>
<jetty.version>9.4.38.v20210224</jetty.version>
<phantomjs.version>2.1.1</phantomjs.version>
<testbench.version>4.2.2</testbench.version>
<testbench.api.version>7.7.14</testbench.api.version>
Expand Down
2 changes: 1 addition & 1 deletion test/servlet-containers/jetty9/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>war</packaging>
<properties>
<jetty.skip>false</jetty.skip>
<jetty.version>9.3.21.v20170918</jetty.version>
<jetty.version>9.4.38.v20210224</jetty.version>
<server.name>jetty9</server.name>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class NoApplicationClassTest extends SingleBrowserTest {
@Test
public void testInvalidApplicationClass() {
openTestURL();
String exceptionMessage = getDriver().findElement(By.xpath("//pre[2]"))
String exceptionMessage = getDriver().findElement(By.xpath("//pre[1]"))
.getText();
String expected = "ServletException: java.lang.ClassNotFoundException: ClassThatIsNotPresent";
Assert.assertTrue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public void testInvalidViewport() {

WebElement heading = findElement(By.tagName("h2"));

Assert.assertEquals("HTTP ERROR 500", heading.getText());
Assert.assertTrue("Unexpected heading: " + heading.getText(),
heading.getText().startsWith("HTTP ERROR 500"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ public void testOpenResourceWith404() {
openTestURL();
$(LinkElement.class).get(2).click(5, 5);
disableWaitingAndWait();
Assert.assertTrue("Page does not contain the given text",
String errorText = "Page does not contain the given text";
Assert.assertTrue(errorText,
driver.getPageSource().contains("HTTP ERROR 404"));
if (!BrowserUtil.isIE(getDesiredCapabilities())) {
Assert.assertTrue("Page does not contain the given text",
driver.getPageSource().contains("Problem accessing /run/APP/"));
}
Assert.assertTrue(errorText,
driver.getPageSource().contains("/run/APP/"));
Assert.assertTrue(errorText,
driver.getPageSource().contains(
"Request was not handled by any registered handler"));
}

@Test
Expand Down

0 comments on commit 61df35a

Please sign in to comment.