You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:52:34 UTC
[35/71] [abbrv] brooklyn-ui git commit: Fix failing tests after
changes to return 403 response code
Fix failing tests after changes to return 403 response code
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/67e671af
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/67e671af
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/67e671af
Branch: refs/heads/0.7.0-incubating
Commit: 67e671af7e24c606664c419b64eaf0f535e2faba
Parents: 9b85ada
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Fri Mar 6 16:16:57 2015 +0200
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Thu Mar 19 16:03:08 2015 +0200
----------------------------------------------------------------------
.../rest/jsgui/BrooklynJavascriptGuiLauncherTest.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/67e671af/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncherTest.java
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncherTest.java b/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncherTest.java
index ca82ee1..ab55d66 100644
--- a/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncherTest.java
+++ b/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncherTest.java
@@ -27,6 +27,7 @@ import brooklyn.config.BrooklynServiceAttributes;
import brooklyn.entity.basic.Entities;
import brooklyn.management.ManagementContext;
import brooklyn.rest.BrooklynRestApiLauncherTestFixture;
+import brooklyn.test.Asserts;
import brooklyn.test.HttpTestUtils;
/** Convenience and demo for launching programmatically. */
@@ -60,8 +61,15 @@ public class BrooklynJavascriptGuiLauncherTest {
checkUrlContains("/v1/catalog/entities", "Tomcat");
}
- protected void checkUrlContains(String path, String text) {
- HttpTestUtils.assertContentContainsText(rootUrl()+path, text);
+ protected void checkUrlContains(final String path, final String text) {
+ //Server may return 403 until it loads completely, wait a bit
+ //until it stabilizes.
+ Asserts.succeedsEventually(new Runnable() {
+ @Override
+ public void run() {
+ HttpTestUtils.assertContentContainsText(rootUrl()+path, text);
+ }
+ });
}
protected void checkEventuallyHealthy() {