Skip to content

Commit b7982ae

Browse files
committed
[grid] Add heath check for LocalDistributor test
1 parent bfce42b commit b7982ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

java/test/org/openqa/selenium/grid/distributor/local/LocalDistributorTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.openqa.selenium.grid.data.SessionRequest;
3535
import org.openqa.selenium.grid.distributor.Distributor;
3636
import org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector;
37+
import org.openqa.selenium.grid.node.HealthCheck;
3738
import org.openqa.selenium.grid.node.Node;
3839
import org.openqa.selenium.grid.node.local.LocalNode;
3940
import org.openqa.selenium.grid.security.Secret;
@@ -76,6 +77,7 @@
7677
import static org.assertj.core.api.Assertions.assertThat;
7778
import static org.assertj.core.api.Assertions.fail;
7879
import static org.openqa.selenium.grid.data.Availability.DRAINING;
80+
import static org.openqa.selenium.grid.data.Availability.UP;
7981
import static org.openqa.selenium.remote.Dialect.W3C;
8082
import static org.openqa.selenium.remote.http.HttpMethod.GET;
8183

@@ -226,6 +228,8 @@ public HttpResponse execute(HttpRequest req) {
226228
.add(caps, new TestSessionFactory(VerifyingHandler::new))
227229
.add(caps, new TestSessionFactory(VerifyingHandler::new))
228230
.maximumConcurrentSessions(3)
231+
.advanced()
232+
.healthCheck(() -> new HealthCheck.Result(UP, "UP!"))
229233
.build();
230234

231235
LocalDistributor distributor = new LocalDistributor(

0 commit comments

Comments
 (0)