You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/08/02 15:42:14 UTC

[1/2] git commit: Use random ports for the HttpUnit based tests

Updated Branches:
  refs/heads/master 6f0aac524 -> 0aade63da


Use random ports for the HttpUnit based tests


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0aade63d
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0aade63d
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0aade63d

Branch: refs/heads/master
Commit: 0aade63da1952f1e327f443b6bcce64ffd0a7de1
Parents: d3b65d6
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Aug 2 15:41:24 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Aug 2 15:42:03 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/wicket/examples/JettyTestCaseDecorator.java | 5 +++--
 .../test/java/org/apache/wicket/examples/WicketWebTestCase.java | 3 ++-
 .../java/org/apache/wicket/filtertest/WithCPWithFPTest.java     | 4 ++--
 .../java/org/apache/wicket/filtertest/WithCPWithoutFPTest.java  | 4 ++--
 4 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/0aade63d/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java b/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java
index 503e3e4..7a4344f 100644
--- a/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java
+++ b/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java
@@ -35,6 +35,7 @@ public class JettyTestCaseDecorator extends Assert
 	private Server server;
 	private String contextPath;
 	private String webappLocation;
+	protected int localPort;
 
 	/**
 	 * @throws Exception
@@ -46,9 +47,8 @@ public class JettyTestCaseDecorator extends Assert
 
 		System.setProperty("wicket.configuration", "deployment");
 
-		server = new Server();
+		server = new Server(0);
 		SelectChannelConnector connector = new SelectChannelConnector();
-		connector.setPort(8098);
 		server.setConnectors(new Connector[] { connector });
 
 		WebAppContext web = new WebAppContext();
@@ -74,6 +74,7 @@ public class JettyTestCaseDecorator extends Assert
 		server.setHandler(web);
 
 		server.start();
+		localPort = connector.getLocalPort();
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/0aade63d/wicket-examples/src/test/java/org/apache/wicket/examples/WicketWebTestCase.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/test/java/org/apache/wicket/examples/WicketWebTestCase.java b/wicket-examples/src/test/java/org/apache/wicket/examples/WicketWebTestCase.java
index dad49c6..46e42f9 100644
--- a/wicket-examples/src/test/java/org/apache/wicket/examples/WicketWebTestCase.java
+++ b/wicket-examples/src/test/java/org/apache/wicket/examples/WicketWebTestCase.java
@@ -31,7 +31,7 @@ import org.junit.Before;
 public abstract class WicketWebTestCase extends JettyTestCaseDecorator
 {
 	/** The base url used to connect the conversation to */
-	private String baseUrl = "http://localhost:8098/";
+	private String baseUrl;
 
 	/** The web conversation that keeps track of our requests. */
 	private WebConversation conversation;
@@ -52,6 +52,7 @@ public abstract class WicketWebTestCase extends JettyTestCaseDecorator
 	public void before() throws Exception
 	{
 		super.before();
+		setBaseUrl(String.format("http://localhost:%d/", localPort));
 		conversation = new WebConversation();
 	}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/0aade63d/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithFPTest.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithFPTest.java b/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithFPTest.java
index 3f193ed..cb8c36a 100644
--- a/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithFPTest.java
+++ b/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithFPTest.java
@@ -32,8 +32,6 @@ public class WithCPWithFPTest extends WithoutCPWithFPTest
 	@Before
 	public void before() throws Exception
 	{
-		setBaseUrl("http://localhost:8098/somecontext");
-
 		setContextPath("/somecontext");
 		String basedir = System.getProperty("basedir");
 		String path = "";
@@ -43,5 +41,7 @@ public class WithCPWithFPTest extends WithoutCPWithFPTest
 		setWebappLocation(path);
 
 		super.before();
+
+		setBaseUrl(String.format("http://localhost:%d/somecontext", localPort));
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/0aade63d/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithoutFPTest.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithoutFPTest.java b/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithoutFPTest.java
index bfe30ba..9eb625a 100644
--- a/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithoutFPTest.java
+++ b/wicket-examples/src/test/java/org/apache/wicket/filtertest/WithCPWithoutFPTest.java
@@ -31,8 +31,6 @@ public class WithCPWithoutFPTest extends WithoutCPWithoutFPTest
 	@Before
 	public void before() throws Exception
 	{
-		setBaseUrl("http://localhost:8098/somecontext");
-
 		setContextPath("/somecontext");
 		String basedir = System.getProperty("basedir");
 		String path = "";
@@ -42,5 +40,7 @@ public class WithCPWithoutFPTest extends WithoutCPWithoutFPTest
 		setWebappLocation(path);
 
 		super.before();
+
+		setBaseUrl(String.format("http://localhost:%d/somecontext", localPort));
 	}
 }


[2/2] git commit: Minor styling improvements in Border examples

Posted by mg...@apache.org.
Minor styling improvements in Border examples


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d3b65d6e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d3b65d6e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d3b65d6e

Branch: refs/heads/master
Commit: d3b65d6ee4e0cec9c00376dfd4bd54883b5b72b7
Parents: 6f0aac5
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Aug 2 08:53:31 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Aug 2 15:42:03 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/wicket/examples/compref/MyBorder.html |  2 +-
 .../java/org/apache/wicket/examples/navomatic/Page1.html  |  8 ++++----
 .../java/org/apache/wicket/examples/navomatic/Page2.html  |  8 ++++----
 .../java/org/apache/wicket/examples/navomatic/Page3.html  | 10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/d3b65d6e/wicket-examples/src/main/java/org/apache/wicket/examples/compref/MyBorder.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/compref/MyBorder.html b/wicket-examples/src/main/java/org/apache/wicket/examples/compref/MyBorder.html
index 82a94a6..3cd8af2 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/compref/MyBorder.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/compref/MyBorder.html
@@ -11,7 +11,7 @@
  Might be handy as preview code.
 
     <wicket:border>
-	 <div style="border: 2px dotted #fc0; width: 300px; padding: 5px;">
+	 <div style="border: 2px dotted #fc0; width: 400px; padding: 5px;">
 	 before the border contents <br />
       <wicket:body/>
      <br />after the border contents <br />

http://git-wip-us.apache.org/repos/asf/wicket/blob/d3b65d6e/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html
index 098cbe5..a619ce0 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page1.html
@@ -4,16 +4,16 @@
     <link rel="stylesheet" type="text/css" href="style.css"/>
 </head>
 <body>
-    <span wicket:id = "mainNavigation"/>
-    <span wicket:id = "navomaticBorder">
+    <div wicket:id = "mainNavigation"></div>
+    <div wicket:id = "navomaticBorder">
 		<div style = "width:250px">
-		<center><h3>Page 1</h3></center>
+		<div style="text-align: center;"><h3>Page 1</h3></div>
 		Welcome to Navomatic.  The navigation links on the left 
 		will allow you to navigate between three pages.  Notice that the current page 
 		(Page1) is displayed in the "Navigation Links" area as italicized text, 
 		while the other pages are displayed as clickable links.  Go ahead 
 		and click the "Page2" link now.
 		</div>
-    </span>
+    </div>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/d3b65d6e/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html
index 7432333..90c64e9 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page2.html
@@ -4,14 +4,14 @@
     <link rel="stylesheet" type="text/css" href="style.css"/>
 </head>
 <body>
-    <span wicket:id = "mainNavigation"/>
-    <span wicket:id = "navomaticBorder">
+    <div wicket:id = "mainNavigation"></div>
+    <div wicket:id = "navomaticBorder">
 		<div style = "width:250px">
-		<center><h3>Page 2</h3></center>
+		<div style="text-align: center;"><h3>Page 2</h3></div>
 		Welcome to Page 2 of Navomatic.  Notice that the Page1 link is now clickable
 		(so that you can return to Page1 if you want to) and the Page2 link is
 		italicized text.  Go ahead and click the Page3 link.
 		</div>
-    </span>
+    </div>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/d3b65d6e/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html
index 902fc47..4daf41d 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/navomatic/Page3.html
@@ -4,10 +4,10 @@
     <link rel="stylesheet" type="text/css" href="style.css"/>
 </head>
 <body>
-    <span wicket:id = "mainNavigation"/>
-    <span wicket:id = "navomaticBorder">
-		<div style = "width:350px">
-		<center><h3>Page 3</h3></center>
+    <div wicket:id = "mainNavigation"></div>
+    <div wicket:id = "navomaticBorder">
+		<div style = "width:400px">
+		<div style="text-align: center;"><h3>Page 3</h3></div>
 		The links on the left are enabled and disabled without
 		any code at all.  Here is the HTML for the navigation area,
 		which can be found in NavomaticBorder.html:
@@ -25,6 +25,6 @@
         NavomaticBorder component is reused between all three pages,
         adding navigation links to each.
 		</div>
-    </span>
+    </div>
 </body>
 </html>