From 61df35a913a11e5122526e7442e78c5e9606c251 Mon Sep 17 00:00:00 2001
From: Tarek Oraby <42799254+tarekoraby@users.noreply.github.com>
Date: Wed, 24 Mar 2021 10:51:21 +0200
Subject: Chore: Change Jetty version to 9.4.38.v20210224 (#12252)
* Update Jetty version to 9.4.38.v20210224
* Update tests
---
pom.xml | 3 +--
test/pom.xml | 2 +-
test/servlet-containers/jetty9/pom.xml | 2 +-
.../tests/applicationservlet/NoApplicationClassTest.java | 2 +-
.../com/vaadin/tests/components/ui/InvalidViewportTest.java | 3 ++-
.../com/vaadin/tests/requesthandlers/AppResource404Test.java | 12 +++++++-----
6 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/pom.xml b/pom.xml
index efa44bb220..d84e1b8ce5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,8 +47,7 @@
${project.build.directory}/dependency-unpack
-
- 9.4.14.v20181114
+ 9.4.38.v20210224
2.1.1
diff --git a/test/pom.xml b/test/pom.xml
index bf36456e2a..c0f7c6f297 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -11,7 +11,7 @@
1.6
1.6
false
- 9.3.7.v20160115
+ 9.4.38.v20210224
2.1.1
4.2.2
7.7.14
diff --git a/test/servlet-containers/jetty9/pom.xml b/test/servlet-containers/jetty9/pom.xml
index d46b826786..4c420bd3c9 100644
--- a/test/servlet-containers/jetty9/pom.xml
+++ b/test/servlet-containers/jetty9/pom.xml
@@ -12,7 +12,7 @@
war
false
- 9.3.21.v20170918
+ 9.4.38.v20210224
jetty9
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java b/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java
index 546be29885..82737e40ba 100644
--- a/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/applicationservlet/NoApplicationClassTest.java
@@ -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(
diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java
index b33cfbf319..c28fbfa15d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/ui/InvalidViewportTest.java
@@ -15,7 +15,8 @@ public class InvalidViewportTest extends SingleBrowserTest {
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"));
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java b/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java
index 99594290b4..8e40c75fed 100644
--- a/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java
+++ b/uitest/src/test/java/com/vaadin/tests/requesthandlers/AppResource404Test.java
@@ -32,12 +32,14 @@ public class AppResource404Test extends MultiBrowserTest {
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
--
cgit v1.2.3