Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Use 4444 for API default port, 3333 for test default, random for others
Browse files Browse the repository at this point in the history
  • Loading branch information
semperos committed Aug 15, 2012
1 parent bba475d commit 70d5a25
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
3 changes: 2 additions & 1 deletion script/grid-hub
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ fi
################################################################################

WEBDRIVER_SERVER_JAR=/opt/selenium-server-standalone.jar
WEBDRIVER_HUB_PARAMS="-role hub -port 3003"
# API default is 4444, so for testing we'll use 3333
WEBDRIVER_HUB_PARAMS="-role hub -port 3333"
WEBDRIVER_HUB_PIDFILE="/tmp/webdriver_hub.pid"

if [ ! -f $WEBDRIVER_SERVER_JAR ]; then
Expand Down
3 changes: 2 additions & 1 deletion script/grid-node
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ fi
################################################################################

WEBDRIVER_SERVER_JAR=/opt/selenium-server-standalone.jar
WEBDRIVER_NODE_PARAMS="-role node -hubHost 127.0.0.1 -hubPort 3003"
# API default is 4444, so for testing we'll use 3333
WEBDRIVER_NODE_PARAMS="-role node -hubHost 127.0.0.1 -hubPort 3333"
WEBDRIVER_NODE_PIDFILE="/tmp/webdriver_node.pid"

if [ ! -f $WEBDRIVER_SERVER_JAR ]; then
Expand Down
6 changes: 3 additions & 3 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ fi
################################################################################

GRID_HOST_DEFAULT=127.0.0.1
# 3001 is default for regular API, so for testing we'll default to 3003
GRID_PORT_DEFAULT=3003
# API default is 4444, so for testing we'll use 3333
GRID_PORT_DEFAULT=3333

DO_testCore() {
if [ $2 == "single" ]; then
Expand All @@ -44,7 +44,7 @@ DO_testRemote() {
if [ -z $WEBDRIVER_GRID_PORT ]; then
export WEBDRIVER_GRID_PORT="${GRID_PORT_DEFAULT}"
fi
lein test clj-webdriver.test.remote-manual
lein test clj-webdriver.test.remote-existing
lein test clj-webdriver.test.remote
lein test clj-webdriver.test.wire
}
Expand Down
4 changes: 2 additions & 2 deletions test/clj_webdriver/test/remote.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
(:require
[clj-webdriver.remote.driver :as rd]))

;; Use port 3004 so we can run this and the remote-manual test without interruption
(let [[this-server this-driver] (new-remote-session {:port 3004} {:browser :firefox})]
;; Non-standard port to avoid conflicts
(let [[this-server this-driver] (new-remote-session {:port 3003} {:browser :firefox})]
(def server this-server)
(def driver this-driver))

Expand Down
5 changes: 3 additions & 2 deletions test/clj_webdriver/test/remote_existing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

(defn hub-port
[]
;; 3001 is default for regular API, so for testing we'll default to 3003
(int (get (System/getenv) "WEBDRIVER_HUB_PORT" 3003)))
;; API default is 4444, so for testing we use 3333
;; see scripts/grid-hub and scripts/grid-node
(int (get (System/getenv) "WEBDRIVER_HUB_PORT" 3333)))

(let [[this-server this-driver] (new-remote-session {:port (hub-port)
:host (hub-host)
Expand Down
3 changes: 2 additions & 1 deletion test/clj_webdriver/test/wire.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[clj-webdriver.remote.driver :only [session-id]]
[clj-webdriver.wire :only [execute]]))

(let [[this-server this-driver] (new-remote-session {:port 3003} {:browser :firefox})]
;; Non-standard port to avoid conflicts
(let [[this-server this-driver] (new-remote-session {:port 3004} {:browser :firefox})]
(def server this-server)
(def driver this-driver))

Expand Down

0 comments on commit 70d5a25

Please sign in to comment.