diff --git a/java/client/src/org/openqa/selenium/net/BUILD.bazel b/java/client/src/org/openqa/selenium/net/BUILD.bazel index ff7155e75e854..9e1a2191a95d3 100644 --- a/java/client/src/org/openqa/selenium/net/BUILD.bazel +++ b/java/client/src/org/openqa/selenium/net/BUILD.bazel @@ -12,6 +12,9 @@ java_library( "//java/client/test/org/openqa/selenium/net:__pkg__", "//java/client/test/org/openqa/selenium/remote/internal:__pkg__", "//java/client/test/org/openqa/selenium/testing/drivers:__pkg__", + "//java/server/src/org/openqa/selenium/events/zeromq:__pkg__", + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", ], deps = [ "//java/client/src/org/openqa/selenium:core", diff --git a/java/client/src/org/openqa/selenium/remote/BUILD.bazel b/java/client/src/org/openqa/selenium/remote/BUILD.bazel index 3124909f07792..91b0a174169c0 100644 --- a/java/client/src/org/openqa/selenium/remote/BUILD.bazel +++ b/java/client/src/org/openqa/selenium/remote/BUILD.bazel @@ -60,7 +60,10 @@ java_library( exports = [ ":api", ":capabilities", + ":http-session-id", ":remote-lib", + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/remote/http", ], deps = [ ":api", diff --git a/java/client/src/org/openqa/selenium/remote/http/BUILD.bazel b/java/client/src/org/openqa/selenium/remote/http/BUILD.bazel index 0aca3d77c9eac..00d005d364231 100644 --- a/java/client/src/org/openqa/selenium/remote/http/BUILD.bazel +++ b/java/client/src/org/openqa/selenium/remote/http/BUILD.bazel @@ -11,6 +11,9 @@ java_library( "//java/client/test/org/openqa/selenium/net:__pkg__", "//java/client/test/org/openqa/selenium/remote:__subpackages__", "//java/client/test/org/openqa/selenium/testing/drivers:__pkg__", + "//java/server/src/org/openqa/selenium/netty:__subpackages__", + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", ], deps = [ "//java/client/src/org/openqa/selenium:core", diff --git a/java/client/src/org/openqa/selenium/remote/tracing/BUILD.bazel b/java/client/src/org/openqa/selenium/remote/tracing/BUILD.bazel index 9de1f6ed3739b..5552c1ef2ea8b 100644 --- a/java/client/src/org/openqa/selenium/remote/tracing/BUILD.bazel +++ b/java/client/src/org/openqa/selenium/remote/tracing/BUILD.bazel @@ -15,5 +15,7 @@ java_library( ], visibility = [ "//java/client/test/org/openqa/selenium/remote/tracing:__subpackages__", + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", ], ) diff --git a/java/rules.bzl b/java/rules.bzl index e161ef4406bfa..d97f011a3fc19 100644 --- a/java/rules.bzl +++ b/java/rules.bzl @@ -78,6 +78,11 @@ def java_test_suite( tests = [] + actual_tags = [] + actual_tags.extend(tags) + if "small" != size: + actual_tags.append("no-sandbox") + for src in srcs: if src.endswith('Test.java'): test_name = src[:-len('.java')] @@ -91,7 +96,7 @@ def java_test_suite( size = size, test_class = test_class, resources = resources, - tags = tags, + tags = actual_tags, deps = deps, visibility = ["//visibility:private"]) diff --git a/java/server/src/org/openqa/selenium/concurrent/BUILD.bazel b/java/server/src/org/openqa/selenium/concurrent/BUILD.bazel new file mode 100644 index 0000000000000..6a56e770c128e --- /dev/null +++ b/java/server/src/org/openqa/selenium/concurrent/BUILD.bazel @@ -0,0 +1,7 @@ +java_library( + name = "concurrent", + srcs = glob(["*.java"]), + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + ], +) diff --git a/java/server/src/org/openqa/selenium/events/BUILD.bazel b/java/server/src/org/openqa/selenium/events/BUILD.bazel new file mode 100644 index 0000000000000..443130d099241 --- /dev/null +++ b/java/server/src/org/openqa/selenium/events/BUILD.bazel @@ -0,0 +1,12 @@ +java_library( + name = "events", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/events:__subpackages__", + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/events/local/BUILD.bazel b/java/server/src/org/openqa/selenium/events/local/BUILD.bazel new file mode 100644 index 0000000000000..6d544337657ad --- /dev/null +++ b/java/server/src/org/openqa/selenium/events/local/BUILD.bazel @@ -0,0 +1,12 @@ +java_library( + name = "local", + srcs = glob(["*.java"]), + deps = [ + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/grid/config", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/events/zeromq/BUILD.bazel b/java/server/src/org/openqa/selenium/events/zeromq/BUILD.bazel new file mode 100644 index 0000000000000..2905794c7d8f0 --- /dev/null +++ b/java/server/src/org/openqa/selenium/events/zeromq/BUILD.bazel @@ -0,0 +1,15 @@ +java_library( + name = "zeromq", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/net", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/grid/config", + "//third_party/java/guava", + "//third_party/java/zeromq:jeromq", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid/router:__pkg__", + ], +) diff --git a/java/server/src/org/openqa/selenium/grid/component/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/component/BUILD.bazel new file mode 100644 index 0000000000000..86f8491029e1c --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/component/BUILD.bazel @@ -0,0 +1,9 @@ +java_library( + name = "component", + srcs = glob(["*.java"]), + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/src/org/openqa/selenium/netty/server:__pkg__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/config/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/config/BUILD.bazel new file mode 100644 index 0000000000000..a03d37747687a --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/config/BUILD.bazel @@ -0,0 +1,13 @@ +java_library( + name = "config", + srcs = glob(["*.java"]), + deps = [ + "//third_party/java/guava", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/events:__subpackages__", + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/src/org/openqa/selenium/netty/server:__pkg__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/data/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/data/BUILD.bazel new file mode 100644 index 0000000000000..cbeb02782e671 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/data/BUILD.bazel @@ -0,0 +1,15 @@ +java_library( + name = "data", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/server/src/org/openqa/selenium/events", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) diff --git a/java/server/src/org/openqa/selenium/grid/distributor/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/distributor/BUILD.bazel new file mode 100644 index 0000000000000..7c261179152b6 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/distributor/BUILD.bazel @@ -0,0 +1,19 @@ +java_library( + name = "distributor", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote/http", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/node/remote", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ] +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/distributor/local/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/distributor/local/BUILD.bazel new file mode 100644 index 0000000000000..6cd859ff061b5 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/distributor/local/BUILD.bazel @@ -0,0 +1,22 @@ +java_library( + name = "local", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/concurrent", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/grid/component", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/distributor", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/node/remote", + "//java/server/src/org/openqa/selenium/grid/sessionmap", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid/distributor:__pkg__", + "//java/server/test/org/openqa/selenium/grid/router:__pkg__", + ] +) diff --git a/java/server/src/org/openqa/selenium/grid/distributor/remote/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/distributor/remote/BUILD.bazel new file mode 100644 index 0000000000000..689f29720eab3 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/distributor/remote/BUILD.bazel @@ -0,0 +1,17 @@ +java_library( + name = "remote", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/distributor", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/web", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid/distributor:__pkg__", + "//java/server/test/org/openqa/selenium/grid/router:__pkg__", + ] +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/node/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/node/BUILD.bazel new file mode 100644 index 0000000000000..39dd007667217 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/node/BUILD.bazel @@ -0,0 +1,19 @@ +java_library( + name = "node", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/http", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/grid/component", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ] +) diff --git a/java/server/src/org/openqa/selenium/grid/node/local/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/node/local/BUILD.bazel new file mode 100644 index 0000000000000..fc84c94de597d --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/node/local/BUILD.bazel @@ -0,0 +1,19 @@ +java_library( + name = "local", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/concurrent", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/grid/component", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/node/remote/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/node/remote/BUILD.bazel new file mode 100644 index 0000000000000..144c484aba467 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/node/remote/BUILD.bazel @@ -0,0 +1,20 @@ +java_library( + name = "remote", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/net", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/grid/component", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/grid/distributor:__subpackages__", + "//java/server/test/org/openqa/selenium/grid/node:__pkg__", + "//java/server/test/org/openqa/selenium/grid/router:__pkg__", + ], +) diff --git a/java/server/src/org/openqa/selenium/grid/router/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/router/BUILD.bazel new file mode 100644 index 0000000000000..1f30a7108078b --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/router/BUILD.bazel @@ -0,0 +1,19 @@ +java_library( + name = "router", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/net", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/distributor", + "//java/server/src/org/openqa/selenium/grid/server", + "//java/server/src/org/openqa/selenium/grid/sessionmap", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ] +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/server/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/server/BUILD.bazel new file mode 100644 index 0000000000000..e6a7a47f24622 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/server/BUILD.bazel @@ -0,0 +1,23 @@ +java_library( + name = "server", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/net", + "//java/client/src/org/openqa/selenium/remote/http", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/grid/component", + "//java/server/src/org/openqa/selenium/grid/config", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/beust:jcommander", + "//third_party/java/guava", + "//third_party/java/jetty", + "//third_party/java/servlet:javax.servlet-api", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/src/org/openqa/selenium/netty/server:__pkg__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) diff --git a/java/server/src/org/openqa/selenium/grid/sessionmap/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/sessionmap/BUILD.bazel new file mode 100644 index 0000000000000..be152ddd922cf --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/sessionmap/BUILD.bazel @@ -0,0 +1,17 @@ +java_library( + name = "sessionmap", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/http", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/sessionmap/local/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/sessionmap/local/BUILD.bazel new file mode 100644 index 0000000000000..7c624dd68efee --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/sessionmap/local/BUILD.bazel @@ -0,0 +1,14 @@ +java_library( + name = "local", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/sessionmap", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ] +) \ No newline at end of file diff --git a/java/server/src/org/openqa/selenium/grid/sessionmap/remote/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/sessionmap/remote/BUILD.bazel new file mode 100644 index 0000000000000..a9f5248e7bec5 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/sessionmap/remote/BUILD.bazel @@ -0,0 +1,14 @@ +java_library( + name = "remote", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/sessionmap", + "//java/server/src/org/openqa/selenium/grid/web", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ] +) diff --git a/java/server/src/org/openqa/selenium/grid/web/BUILD.bazel b/java/server/src/org/openqa/selenium/grid/web/BUILD.bazel new file mode 100644 index 0000000000000..993ce72cdfdf2 --- /dev/null +++ b/java/server/src/org/openqa/selenium/grid/web/BUILD.bazel @@ -0,0 +1,15 @@ +java_library( + name = "web", + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/http", + "//third_party/java/guava", + ], + visibility = [ + "//java/server/src/org/openqa/selenium/grid:__subpackages__", + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/commands/StandaloneTest.java b/java/server/test/org/openqa/selenium/grid/commands/StandaloneTest.java deleted file mode 100644 index abbfc5d7b2765..0000000000000 --- a/java/server/test/org/openqa/selenium/grid/commands/StandaloneTest.java +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.grid.commands; - -import org.junit.Test; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.firefox.FirefoxOptions; -import org.openqa.selenium.remote.RemoteWebDriver; - -public class StandaloneTest { - - @Test - public void woohooAgain() { - WebDriver driver = RemoteWebDriver.builder() - .url("http://localhost:4444") - .oneOf(new FirefoxOptions()) - .build(); - - driver.get("http://www.google.com"); - driver.quit(); - } - -} diff --git a/java/server/test/org/openqa/selenium/grid/config/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/config/BUILD.bazel new file mode 100644 index 0000000000000..8da860d954ee3 --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/config/BUILD.bazel @@ -0,0 +1,12 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "SmallTests", + size = "small", + srcs = glob(["*Test.java"]), + deps = [ + "//java/server/src/org/openqa/selenium/grid/config", + "//third_party/java/beust:jcommander", + "//third_party/java/guava", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/data/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/data/BUILD.bazel new file mode 100644 index 0000000000000..cb5a743657a2c --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/data/BUILD.bazel @@ -0,0 +1,16 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "SmallTests", + size = "small", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/server/src/org/openqa/selenium/grid/data", + "//third_party/java/assertj", + "//third_party/java/guava", + "//third_party/java/junit", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/distributor/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/distributor/BUILD.bazel new file mode 100644 index 0000000000000..6839187f66ab5 --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/distributor/BUILD.bazel @@ -0,0 +1,30 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "MediumTests", + size = "medium", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/client/src/org/openqa/selenium/net", + "//java/client/src/org/openqa/selenium/support", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/events/local", + "//java/server/src/org/openqa/selenium/grid/component", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/distributor", + "//java/server/src/org/openqa/selenium/grid/distributor/local", + "//java/server/src/org/openqa/selenium/grid/distributor/remote", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/node/local", + "//java/server/src/org/openqa/selenium/grid/sessionmap", + "//java/server/src/org/openqa/selenium/grid/sessionmap/local", + "//java/server/src/org/openqa/selenium/grid/web", + "//java/server/test/org/openqa/selenium/grid/testing", + "//third_party/java/assertj", + "//third_party/java/guava", + "//third_party/java/junit", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/node/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/node/BUILD.bazel new file mode 100644 index 0000000000000..ff2071b769b77 --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/node/BUILD.bazel @@ -0,0 +1,24 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "SmallTests", + size = "small", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/client/src/org/openqa/selenium/support", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/events/local", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/node/local", + "//java/server/src/org/openqa/selenium/grid/node/remote", + "//java/server/src/org/openqa/selenium/grid/web", + "//java/server/test/org/openqa/selenium/grid/testing", + "//third_party/java/assertj", + "//third_party/java/guava", + "//third_party/java/junit", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/node/local/BUCK b/java/server/test/org/openqa/selenium/grid/node/local/BUCK index 47c2e6eafdf77..c379227d52a40 100644 --- a/java/server/test/org/openqa/selenium/grid/node/local/BUCK +++ b/java/server/test/org/openqa/selenium/grid/node/local/BUCK @@ -7,7 +7,7 @@ java_test( deps = [ "//java/client/src/org/openqa/selenium/remote:remote", "//java/client/src/org/openqa/selenium/remote/tracing:tracing", - "//java/server/src/org/openqa/selenium/events/zeromq:zeromq", + "//java/server/src/org/openqa/selenium/events/local:local", "//java/server/src/org/openqa/selenium/grid/data:data", "//java/server/src/org/openqa/selenium/grid/node:node", "//java/server/src/org/openqa/selenium/grid/node/local:local", diff --git a/java/server/test/org/openqa/selenium/grid/node/local/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/node/local/BUILD.bazel new file mode 100644 index 0000000000000..c121f803e50a7 --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/node/local/BUILD.bazel @@ -0,0 +1,20 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "SmallTests", + size = "small", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/events/local", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/node/local", + "//java/server/test/org/openqa/selenium/grid/testing", + "//third_party/java/assertj", + "//third_party/java/guava", + "//third_party/java/junit", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/node/local/CreateSessionTest.java b/java/server/test/org/openqa/selenium/grid/node/local/CreateSessionTest.java index 5e8759b536653..7379492650c2d 100644 --- a/java/server/test/org/openqa/selenium/grid/node/local/CreateSessionTest.java +++ b/java/server/test/org/openqa/selenium/grid/node/local/CreateSessionTest.java @@ -31,7 +31,7 @@ import org.junit.Test; import org.openqa.selenium.Capabilities; import org.openqa.selenium.ImmutableCapabilities; -import org.openqa.selenium.events.zeromq.ZeroMqEventBus; +import org.openqa.selenium.events.local.GuavaEventBus; import org.openqa.selenium.grid.data.CreateSessionRequest; import org.openqa.selenium.grid.data.CreateSessionResponse; import org.openqa.selenium.grid.data.Session; @@ -42,7 +42,6 @@ import org.openqa.selenium.remote.http.HttpClient; import org.openqa.selenium.remote.http.HttpRequest; import org.openqa.selenium.remote.tracing.DistributedTracer; -import org.zeromq.ZContext; import java.net.URI; import java.net.URISyntaxException; @@ -66,7 +65,7 @@ public void shouldAcceptAW3CPayload() throws URISyntaxException { Node node = LocalNode.builder( DistributedTracer.builder().build(), - ZeroMqEventBus.create(new ZContext(), "inproc://cst-pub", "inproc://cst-sub", true), + new GuavaEventBus(), HttpClient.Factory.createDefault(), uri) .add(stereotype, new TestSessionFactory((id, caps) -> new Session(id, uri, caps))) @@ -116,7 +115,7 @@ public void ifOnlyJWPPayloadSentResponseShouldBeJWPOnlyIfJWPConfigured() Node node = LocalNode.builder( DistributedTracer.builder().build(), - ZeroMqEventBus.create(new ZContext(), "inproc://cst-pub", "inproc://cst-sub", true), + new GuavaEventBus(), HttpClient.Factory.createDefault(), uri) .add(stereotype, new TestSessionFactory((id, caps) -> new Session(id, uri, caps))) @@ -158,7 +157,7 @@ public void shouldPreferUsingTheW3CProtocol() throws URISyntaxException { Node node = LocalNode.builder( DistributedTracer.builder().build(), - ZeroMqEventBus.create(new ZContext(), "inproc://cst-pub", "inproc://cst-sub", true), + new GuavaEventBus(), HttpClient.Factory.createDefault(), uri) .add(stereotype, new TestSessionFactory((id, caps) -> new Session(id, uri, caps))) diff --git a/java/server/test/org/openqa/selenium/grid/router/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/router/BUILD.bazel new file mode 100644 index 0000000000000..0504eb709717f --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/router/BUILD.bazel @@ -0,0 +1,37 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "MediumTests", + size = "medium", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:core", + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/net", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/client/src/org/openqa/selenium/support", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/events/local", + "//java/server/src/org/openqa/selenium/events/zeromq", + "//java/server/src/org/openqa/selenium/grid/component", + "//java/server/src/org/openqa/selenium/grid/config", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/distributor", + "//java/server/src/org/openqa/selenium/grid/distributor/local", + "//java/server/src/org/openqa/selenium/grid/distributor/remote", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/node/local", + "//java/server/src/org/openqa/selenium/grid/router", + "//java/server/src/org/openqa/selenium/grid/server", + "//java/server/src/org/openqa/selenium/grid/sessionmap", + "//java/server/src/org/openqa/selenium/grid/sessionmap/local", + "//java/server/src/org/openqa/selenium/grid/sessionmap/remote", + "//java/server/src/org/openqa/selenium/grid/web", + "//java/server/test/org/openqa/selenium/grid/testing", + "//third_party/java/assertj", + "//third_party/java/guava", + "//third_party/java/junit", + "//third_party/java/zeromq:jeromq", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/server/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/server/BUILD.bazel new file mode 100644 index 0000000000000..fdc83a1242876 --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/server/BUILD.bazel @@ -0,0 +1,20 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "MediumTests", + size = "medium", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/server/src/org/openqa/selenium/grid/config", + "//java/server/src/org/openqa/selenium/grid/server", + "//java/server/src/org/openqa/selenium/grid/web", + "//java/server/test/org/openqa/testing", + "//third_party/java/assertj", + "//third_party/java/guava", + "//third_party/java/junit", + "//third_party/java/servlet:javax.servlet-api", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/sessionmap/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/sessionmap/BUILD.bazel new file mode 100644 index 0000000000000..8cfd4539c3389 --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/sessionmap/BUILD.bazel @@ -0,0 +1,21 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "SmallTests", + size = "small", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/tracing", + "//java/client/src/org/openqa/selenium/support", + "//java/server/src/org/openqa/selenium/events", + "//java/server/src/org/openqa/selenium/events/local", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/sessionmap", + "//java/server/src/org/openqa/selenium/grid/sessionmap/local", + "//java/server/src/org/openqa/selenium/grid/sessionmap/remote", + "//java/server/test/org/openqa/selenium/grid/testing", + "//third_party/java/assertj", + "//third_party/java/junit", + ], +) diff --git a/java/server/test/org/openqa/selenium/grid/testing/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/testing/BUILD.bazel new file mode 100644 index 0000000000000..c8bd955ce4f6d --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/testing/BUILD.bazel @@ -0,0 +1,14 @@ +java_library( + name = "testing", + testonly = True, + srcs = glob(["*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/remote", + "//java/server/src/org/openqa/selenium/grid/data", + "//java/server/src/org/openqa/selenium/grid/node", + "//java/server/src/org/openqa/selenium/grid/web", + ], + visibility = [ + "//java/server/test/org/openqa/selenium/grid:__subpackages__", + ] +) \ No newline at end of file diff --git a/java/server/test/org/openqa/selenium/grid/web/BUILD.bazel b/java/server/test/org/openqa/selenium/grid/web/BUILD.bazel new file mode 100644 index 0000000000000..edcb8dcd3689f --- /dev/null +++ b/java/server/test/org/openqa/selenium/grid/web/BUILD.bazel @@ -0,0 +1,17 @@ +load("//java:rules.bzl", "java_test_suite") + +java_test_suite( + name = "MediumTests", + size = "medium", + srcs = glob(["*Test.java"]), + deps = [ + "//java/client/src/org/openqa/selenium/json", + "//java/client/src/org/openqa/selenium/net", + "//java/client/src/org/openqa/selenium/remote", + "//java/client/src/org/openqa/selenium/remote/http", + "//java/server/src/org/openqa/selenium/grid/web", + "//third_party/java/assertj", + "//third_party/java/guava", + "//third_party/java/junit", + ], +) diff --git a/java/server/test/org/openqa/testing/BUILD.bazel b/java/server/test/org/openqa/testing/BUILD.bazel new file mode 100644 index 0000000000000..2d0b0b989965b --- /dev/null +++ b/java/server/test/org/openqa/testing/BUILD.bazel @@ -0,0 +1,11 @@ +java_library( + name = "testing", + srcs = glob(["*.java"]), + deps = [ + "//third_party/java/guava", + "//third_party/java/servlet:javax.servlet-api", + ], + visibility = [ + "//java/server/test/org/openqa/selenium:__subpackages__", + ], +)