You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2020/12/05 18:13:04 UTC
[tapestry-5] branch master updated: Adding checks of webapp not
starting up successfully in tests
This is an automated email from the ASF dual-hosted git repository.
thiagohp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
The following commit(s) were added to refs/heads/master by this push:
new 22a181f Adding checks of webapp not starting up successfully in tests
22a181f is described below
commit 22a181f026ba235bdf401516b77720ee95551d9b
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Sat Dec 5 15:12:28 2020 -0300
Adding checks of webapp not starting up successfully in tests
---
.../integration/TapestryBeanValidationIntegrationTests.java | 6 ------
.../src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java | 4 ++++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java b/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
index 3851c0e..a8fc31c 100644
--- a/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
+++ b/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
@@ -107,12 +107,6 @@ public class TapestryBeanValidationIntegrationTests extends SeleniumTestCase
@Test
public void beaneditform_validation() throws Exception
{
- openBaseURL();
- LOGGER.info("===================================");
- LOGGER.info(getHtmlSource());
- LOGGER.info("===================================");
- openLinks("BeanEditForm Validation Demo");
-
clickAndWait(SUBMIT);
assertTextPresent("User Name may not be null", "Password may not be null");
diff --git a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
index af22cd9..6a22bde 100644
--- a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
+++ b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
@@ -1636,6 +1636,10 @@ public abstract class SeleniumTestCase extends Assert implements Selenium
protected final void openLinks(String... linkText)
{
openBaseURL();
+
+ if (getTitle().toLowerCase().contains("service unavailable")) {
+ throw new RuntimeException("Webapp didn't start correctly. HTML contents: " + getHtmlSource());
+ }
for (String text : linkText)
{