Update of /var/cvs/tests/common/org/mmbase/tests
In directory james.mmbase.org:/tmp/cvs-serv8363

Modified Files:
        BridgeTest.java 
Log Message:



See also: http://cvs.mmbase.org/viewcvs/tests/common/org/mmbase/tests


Index: BridgeTest.java
===================================================================
RCS file: /var/cvs/tests/common/org/mmbase/tests/BridgeTest.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- BridgeTest.java     20 Oct 2008 14:09:59 -0000      1.22
+++ BridgeTest.java     3 Nov 2008 17:31:38 -0000       1.23
@@ -64,14 +64,19 @@
     }
 
     protected Cloud getCloud(String userName) {
+        try {
         CloudThreadLocal.unbind();
         Map<String, Object> loginInfo = new HashMap<String, Object>();
         loginInfo.put("username", userName);
         Cloud c = getCloudContext().getCloud("mmbase", "class", loginInfo);
         ensureDeployed(c, "local cloud");
         CloudThreadLocal.bind(c);
-        log.debug("Found cloud of " + c.getUser().getIdentifier() + " with " + 
loginInfo);
         return c;
+        } catch (Throwable t) {
+            System.err.println(t.getMessage());
+            System.err.println(Logging.stackTrace(t));
+            return null;
+        }
     }
     protected Cloud getCloud() {
         return getCloud("admin");
@@ -98,11 +103,11 @@
         while(c == null) {
             try {
                 Map<String, Object> loginInfo = new HashMap<String, Object>();
-                loginInfo.put("rank", "administrator");
+                loginInfo.put("username", "admin");
                 c =   ContextProvider.getCloudContext(uri).getCloud("mmbase", 
"class", loginInfo);
                 break;
             } catch (BridgeException be) {
-                System.out.println(be.getMessage() + ". " + uri + ". Perhaps 
mmbase '" + uri + "' not yet running, retrying in 5 seconds (" + tryCount + 
")");
+                System.out.println(be.getMessage() + ". " + uri + ". Perhaps 
mmbase '" + uri + "' not yet running, retrying in 5 seconds (" + tryCount + ") 
" + be.getMessage());
                 try {
                     tryCount ++;
                     Thread.sleep(5000);
@@ -110,6 +115,8 @@
                     return null;
                 }
                 if (tryCount > 25) throw be;
+            } catch (Throwable t) {
+                System.out.println(t.getMessage());
             }
         }
         ensureDeployed(c, uri);
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to