[jboss-svn-commits] JBoss Portal SVN: r5630 - in trunk: portlet/src/main/org/jboss/portal/test/framework/portlet server/src/main/org/jboss/portal/test/framework/server/driver test/src/main/org/jboss/portal/test/framework/driver/http wsrp/src/main/org/jboss/portal/test/wsrp

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Nov 13 12:01:22 EST 2006


Author: julien at jboss.com
Date: 2006-11-13 12:01:04 -0500 (Mon, 13 Nov 2006)
New Revision: 5630

Modified:
   trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java
   trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java
   trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/AbstractHttpTestDriverServerService.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java
Log:
on test HttpTestDriverServer renamed updateContext/retrieveContext to pushContext / popContext

Modified: trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java	2006-11-13 17:01:04 UTC (rev 5630)
@@ -111,12 +111,12 @@
       return new InvokeGetResponse("/test/" + info.getName());
    }
 
-   public void updateContext(String testId, HttpTestContext ctx)
+   public void pushContext(String testId, HttpTestContext ctx)
    {
       PortletTestDriver.context = new PortletTestContext(ctx);
    }
 
-   public HttpTestContext retrieveContext(String testId)
+   public HttpTestContext popContext(String testId)
    {
       return PortletTestDriver.context.httpTestContext;
    }

Modified: trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java	2006-11-13 17:01:04 UTC (rev 5630)
@@ -120,12 +120,12 @@
       testDriverRegistry.unregister(this);
    }
 
-   public void updateContext(String testId, HttpTestContext ctx)
+   public void pushContext(String testId, HttpTestContext ctx)
    {
       this.context = ctx;
    }
 
-   public HttpTestContext retrieveContext(String testId)
+   public HttpTestContext popContext(String testId)
    {
       return context;
    }

Modified: trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java	2006-11-13 17:01:04 UTC (rev 5630)
@@ -160,7 +160,7 @@
       return _container;
    }
 
-   public void updateContext(String testId, HttpTestContext ctx)
+   public void pushContext(String testId, HttpTestContext ctx)
    {
       TestDriver driver = getDriver(testId);
       if (driver instanceof HttpTestDriverServer)
@@ -170,17 +170,17 @@
          String newId = item.getId(httpDriver.getInfo());
          HttpTestContext ctx2 = new HttpTestContext(newId, ctx.getRequestCount(), ctx.getArchivePath());
          ctx2.setTestAgent(getAgent());
-         httpDriver.updateContext(newId, ctx2);
+         httpDriver.pushContext(newId, ctx2);
       }
    }
 
-   public HttpTestContext retrieveContext(String testId)
+   public HttpTestContext popContext(String testId)
    {
       TestDriver tmp = getDriver(testId);
       HttpTestDriverServer driver = (HttpTestDriverServer)tmp;
       TestItemInfo item = _container.findItem(testId);
       String newId = item.getId(driver.getInfo());
-      HttpTestContext context = driver.retrieveContext(newId);
+      HttpTestContext context = driver.popContext(newId);
       context = new HttpTestContext(context);
       context.setTestAgent(null);
       return context;

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/AbstractHttpTestDriverServerService.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/AbstractHttpTestDriverServerService.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/AbstractHttpTestDriverServerService.java	2006-11-13 17:01:04 UTC (rev 5630)
@@ -48,7 +48,7 @@
       this.agent = agent;
    }
 
-   public void updateContext(String testId, HttpTestContext ctx)
+   public void pushContext(String testId, HttpTestContext ctx)
    {
       ctx.setTestAgent(agent);
 
@@ -56,7 +56,7 @@
       HttpTestContext.setCurrentContext(ctx);
    }
 
-   public HttpTestContext retrieveContext(String testId)
+   public HttpTestContext popContext(String testId)
    {
       HttpTestContext ctx = HttpTestContext.peekCurrentContext();
 

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java	2006-11-13 17:01:04 UTC (rev 5630)
@@ -164,7 +164,7 @@
    {
 
       /** The test name. */
-      final String testName;
+      final String testId;
 
       /** . */
       HttpClient client;
@@ -175,9 +175,9 @@
       /** The request count for that session. */
       int requestCount;
 
-      public TestConversation(String testName, Node node)
+      public TestConversation(String testId, Node node)
       {
-         this.testName = testName;
+         this.testId = testId;
          this.node = node;
 
          //
@@ -304,7 +304,7 @@
          {
             requestCount = -1;
             pushContext();
-            DriverResponse response = getServer().invoke(testName, cmd);
+            DriverResponse response = getServer().invoke(testId, cmd);
             requestCount = 0;
             return response;
          }
@@ -314,10 +314,11 @@
          }
       }
 
+
+
       private DriverResponse decodeHttpResponse(HttpMethod hm) throws Exception
       {
-         HttpTestDriverServer agent = getServer();
-         HttpTestContext ctx = agent.retrieveContext(testName);
+         HttpTestContext ctx = popContext();
          DriverResponse response = ctx.getResponse();
          int status = hm.getStatusCode();
          switch (status)
@@ -325,7 +326,7 @@
             case 200:
                if (response == null)
                {
-                  throw new AssertionFailedError("No result for test " + testName + " in the response");
+                  throw new AssertionFailedError("No result for test " + testId + " in the response");
                }
                else
                {
@@ -406,13 +407,19 @@
 
       private void pushContext()
       {
-         HttpTestContext ctx = new HttpTestContext(testName, requestCount, archivePath);
+         HttpTestContext ctx = new HttpTestContext(testId, requestCount, archivePath);
 
          log.info("# Updating test case context of : " + node + " : " + ctx);
          HttpTestDriverServer agent = getServer();
-         agent.updateContext(testName, ctx);
+         agent.pushContext(testId, ctx);
       }
 
+      private HttpTestContext popContext()
+      {
+         HttpTestDriverServer agent = getServer();
+         return agent.popContext(testId);
+      }
+
       private Node getNode(int port)
       {
          NodeId nodeId = null;

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java	2006-11-13 17:01:04 UTC (rev 5630)
@@ -33,10 +33,10 @@
    /**
     *
     */
-   void updateContext(String testId, HttpTestContext ctx);
+   void pushContext(String testId, HttpTestContext ctx);
 
    /**
     *
     */
-   HttpTestContext retrieveContext(String testId);
+   HttpTestContext popContext(String testId);
 }

Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/WSRPBaseTest.java	2006-11-13 17:01:04 UTC (rev 5630)
@@ -238,12 +238,12 @@
       return test.invoke(testId, command);
    }
 
-   public void updateContext(String testId, HttpTestContext ctx)
+   public void pushContext(String testId, HttpTestContext ctx)
    {
       this.context = ctx;
    }
 
-   public HttpTestContext retrieveContext(String testId)
+   public HttpTestContext popContext(String testId)
    {
       return context;
    }




More information about the jboss-svn-commits mailing list