38
38
import org .openqa .selenium .grid .node .SessionFactory ;
39
39
import org .openqa .selenium .grid .node .local .LocalNode ;
40
40
import org .openqa .selenium .grid .server .BaseServerOptions ;
41
- import org .openqa .selenium .jetty .server .JettyServer ;
42
41
import org .openqa .selenium .grid .server .Server ;
43
42
import org .openqa .selenium .grid .sessionmap .SessionMap ;
44
43
import org .openqa .selenium .grid .sessionmap .local .LocalSessionMap ;
49
48
import org .openqa .selenium .grid .web .Values ;
50
49
import org .openqa .selenium .json .Json ;
51
50
import org .openqa .selenium .net .PortProber ;
51
+ import org .openqa .selenium .netty .server .NettyServer ;
52
52
import org .openqa .selenium .remote .RemoteWebDriver ;
53
53
import org .openqa .selenium .remote .SessionId ;
54
54
import org .openqa .selenium .remote .http .HttpClient ;
@@ -185,7 +185,7 @@ private static Object[] createRemotes() throws URISyntaxException {
185
185
LocalNode localNode = LocalNode .builder (bus , clientFactory , nodeUri )
186
186
.add (CAPS , createFactory (nodeUri ))
187
187
.build ();
188
- Server <?> nodeServer = new JettyServer (
188
+ Server <?> nodeServer = new NettyServer (
189
189
new BaseServerOptions (
190
190
new MapConfig (ImmutableMap .of ("server" , ImmutableMap .of ("port" , port )))),
191
191
localNode );
@@ -202,7 +202,8 @@ private static Object[] createRemotes() throws URISyntaxException {
202
202
203
203
private static Server <?> createServer (HttpHandler handler ) {
204
204
int port = PortProber .findFreePort ();
205
- return new JettyServer (new BaseServerOptions (
205
+ return new NettyServer (
206
+ new BaseServerOptions (
206
207
new MapConfig (ImmutableMap .of ("server" , ImmutableMap .of ("port" , port )))),
207
208
handler );
208
209
}
@@ -223,6 +224,17 @@ public HttpResponse execute(HttpRequest req) throws UncheckedIOException {
223
224
return new TestSessionFactory ((id , caps ) -> new SpoofSession (caps ));
224
225
}
225
226
227
+ @ Test
228
+ public void success () {
229
+ // The node added only has a single node. Make sure we can start and stop sessions.
230
+ Capabilities caps = new ImmutableCapabilities ("browserName" , "cheese" , "type" , "cheddar" );
231
+ WebDriver driver = new RemoteWebDriver (server .getUrl (), caps );
232
+ driver .get ("http://www.google.com" );
233
+
234
+ // Kill the session, and wait until the grid says it's ready
235
+ driver .quit ();
236
+ }
237
+
226
238
@ Test
227
239
public void exerciseDriver () {
228
240
// The node added only has a single node. Make sure we can start and stop sessions.
0 commit comments