[embjopr-commits] EMBJOPR SVN: r514 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war.

embjopr-commits at lists.jboss.org embjopr-commits at lists.jboss.org
Wed Jun 10 11:21:20 EDT 2009


Author: ozizka at redhat.com
Date: 2009-06-10 11:21:20 -0400 (Wed, 10 Jun 2009)
New Revision: 514

Modified:
   trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java
Log:
WarTest updated

Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java	2009-06-08 16:59:10 UTC (rev 513)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java	2009-06-10 15:21:20 UTC (rev 514)
@@ -177,8 +177,12 @@
 			// Lack of Commons HttpClient documentation.
 			/**/
 
-			Socket socket = new Socket(InetAddress.getLocalHost(), ejtt.getEmbJoprPort());
-			socket.getOutputStream().write( ("GET /test/index.jsp HTTP/1.1\nHost: "+VHOST_1+"\n\n").getBytes() );
+			// Send a raw HTTP request to validate the virtual host functionality.
+			InetAddress ip = ejtt.getEmbJoprIpAddress();
+			log.info("Sending HTTP request to "+ip.toString()+" at port "+ejtt.getEmbJoprPort());
+			Socket socket = new Socket(ip, ejtt.getEmbJoprPort());
+			String httpRequest = "GET /test/index.jsp HTTP/1.1\nHost: "+VHOST_1+"\n\n";
+			socket.getOutputStream().write( httpRequest.getBytes() );
 
 			BufferedInputStream inputStream =  new BufferedInputStream(socket.getInputStream());
 			StringBuilder sb = new StringBuilder(4096);
@@ -488,19 +492,22 @@
 
 
 			String path = ejtt.getDeployDir()+"/"+DEPLOYABLE_NAME;
-			assertEquals(path, props.getProperty("Path").trim()); // EMBJOPR-110 here
+			assertEquals(path, props.getProperty("Path").trim());
 			assertEquals("no", props.getProperty("Exploded?").trim());
-
-			// Metrics Summary
-			HtmlTable summaryTable = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Numeric Metrics").getElement();
-			infoTable = ejtt.getContentInfoTable(summaryTable);
-			// (nothing here yet)
-
-
+			
+			
+			// Metrics Summary - currently hidden.
+			ContentTable metricsTable = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Numeric Metrics");
+			if( null == metricsTable )
+				log.info("Metrics table not present.");
+			else{
+				HtmlTable summaryTable = metricsTable.getElement();
+				infoTable = ejtt.getContentInfoTable(summaryTable);
+				// (nothing here yet)
+			}
 		}
 		finally {
-			// Undeploy the WAR
-			undeployWAR( DEPLOYABLE_NAME );
+			ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
 		}
 
 	}// testWarSummary()




More information about the embjopr-commits mailing list