geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1004824 - in /geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src: main/java/org/apache/geronimo/testsuite/servlet3/app/ test/java/org/apache/geronimo/testsuite/servlet3/
Date Tue, 05 Oct 2010 22:00:36 GMT
Author: djencks
Date: Tue Oct  5 22:00:35 2010
New Revision: 1004824

URL: http://svn.apache.org/viewvc?rev=1004824&view=rev
Log:
GERONIMO-5471 use better xpath in async test, now works on jetty

Modified:
    geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/AsyncServlet.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/TaskExecutor.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/test/java/org/apache/geronimo/testsuite/servlet3/TestAsync.java

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/AsyncServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/AsyncServlet.java?rev=1004824&r1=1004823&r2=1004824&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/AsyncServlet.java
(original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/AsyncServlet.java
Tue Oct  5 22:00:35 2010
@@ -37,11 +37,11 @@ public class AsyncServlet extends HttpSe
 		PrintWriter out = resp.getWriter();
 		out.println("<html>");
         out.println("<head>");
-        out.println("<title>Test AsyncServerlet.</title>");  
+        out.println("<title>Test AsyncServlet.</title>");
         out.println("</head>");
         out.println("<body>");
-        out.println("<p id=a>");
-		out.println("Servlet starts at: " + "<font color=red><b id=sst>" + new Date()
+ "</b></font>" + ".");
+        out.println("<p id='a'>");
+		out.println("Servlet starts at: " + "<font color='red'><b id='sst'>" + new
Date() + "</b></font>" + ".");
         out.println("</p>");
 		out.println("<br><br>");
 
@@ -50,8 +50,8 @@ public class AsyncServlet extends HttpSe
 		AsyncContext ctx =req.startAsync();
 		new Thread(new TaskExecutor(ctx)).start();
 		
-		out.println("<p id=b>");
-		out.println("Task assigned to executor.Servlet fineshes at: " + "<font color=red><b
id=sft>" + new Date() + "</b></font>" + ".");
+		out.println("<p id='b'>");
+		out.println("Task assigned to executor.Servlet finishes at: " + "<font color='red'><b
id='sft'>" + new Date() + "</b></font>" + ".");
         out.println("</p>");
 		out.println("<br><br>");
 		out.flush();

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/TaskExecutor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/TaskExecutor.java?rev=1004824&r1=1004823&r2=1004824&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/TaskExecutor.java
(original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/main/java/org/apache/geronimo/testsuite/servlet3/app/TaskExecutor.java
Tue Oct  5 22:00:35 2010
@@ -42,8 +42,8 @@ public class TaskExecutor implements Run
 			
 			e.printStackTrace();
 		}
-		out.println("<p id=c>");
-		out.println("TaskExecutor starts at: " + "<font color=red><b id=tst>" + new
Date() + "</b></font>" + "." + "Task stars executing" + ".");
+		out.println("<p id='c'>");
+		out.println("TaskExecutor starts at: " + "<font color='red'><b id='tst'>" +
new Date() + "</b></font>" + "." + "Task starts executing" + ".");
 		out.println("</p>");
 		out.println("<br><br>");
 		out.flush();
@@ -53,17 +53,18 @@ public class TaskExecutor implements Run
 			
 			e.printStackTrace();
 		}
-		out.println("<p id=d>");
+		out.println("<p id='d'>");
 		out.println("Task finishes.");
 		out.println("</p>");
 		out.println("<p>");
-		out.println("TaskExecutor fineshes at: " + "<font color=red><b id=tft>" + new
Date() + "</b></font>" + ".");
+		out.println("TaskExecutor finishes at: " + "<font color='red'><b id='tft'>"
+ new Date() + "</b></font>" + ".");
 		out.println("</p>");
 		out.println("<br><br>");
         out.println("</body>");
         out.println("</html>");
         out.flush();
         out.close();
+        ctx.complete();
 	}
 
 }

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/test/java/org/apache/geronimo/testsuite/servlet3/TestAsync.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/test/java/org/apache/geronimo/testsuite/servlet3/TestAsync.java?rev=1004824&r1=1004823&r2=1004824&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/test/java/org/apache/geronimo/testsuite/servlet3/TestAsync.java
(original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/servlet3.0-test/servlet3.0-test-war/src/test/java/org/apache/geronimo/testsuite/servlet3/TestAsync.java
Tue Oct  5 22:00:35 2010
@@ -35,16 +35,16 @@ public class TestAsync extends SeleniumT
 
 		assertTrue(selenium.isTextPresent("Servlet starts at:"));
 		assertTrue(selenium
-				.isTextPresent("Task assigned to executor.Servlet fineshes at:"));
+				.isTextPresent("Task assigned to executor.Servlet finishes at:"));
 		assertTrue(selenium.isTextPresent("TaskExecutor starts at:"));
 		assertTrue(selenium.isTextPresent("Task finishes."));
-		assertTrue(selenium.isTextPresent("TaskExecutor fineshes at:"));
+		assertTrue(selenium.isTextPresent("TaskExecutor finishes at:"));
 
-		String[] sftSplit = selenium.getText("xpath=//p[2]").split(":");
+		String[] sftSplit = selenium.getText("xpath=//b[@id='sft']").split(":");
 		int sfti = getTime(sftSplit);
-		String[] tstSplit = selenium.getText("xpath=//p[3]").split(":");
+		String[] tstSplit = selenium.getText("xpath=//b[@id='tst']").split(":");
 		int tsti = getTime(tstSplit);
-		String[] tftSplit = selenium.getText("xpath=//p[5]").split(":");
+		String[] tftSplit = selenium.getText("xpath=//b[@id='tft']").split(":");
 		int tfti = getTime(tftSplit);
 		assertTrue(sfti == tsti);
 		assertTrue(Math.abs(tfti - sfti) == 10);



Mime
View raw message