|
| 1 | +// Licensed to the Software Freedom Conservancy (SFC) under one |
| 2 | +// or more contributor license agreements. See the NOTICE file |
| 3 | +// distributed with this work for additional information |
| 4 | +// regarding copyright ownership. The SFC licenses this file |
| 5 | +// to you under the Apache License, Version 2.0 (the |
| 6 | +// "License"); you may not use this file except in compliance |
| 7 | +// with the License. You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, |
| 12 | +// software distributed under the License is distributed on an |
| 13 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +// KIND, either express or implied. See the License for the |
| 15 | +// specific language governing permissions and limitations |
| 16 | +// under the License. |
| 17 | + |
1 | 18 | package org.openqa.selenium.net;
|
2 | 19 |
|
3 | 20 | import org.junit.jupiter.api.Tag;
|
4 | 21 | import org.junit.jupiter.api.Test;
|
5 |
| -import org.openqa.selenium.Platform; |
6 | 22 |
|
7 | 23 | import java.net.InetSocketAddress;
|
8 | 24 | import java.net.ServerSocket;
|
@@ -30,15 +46,6 @@ void checkPortIsFree_checksIpv4AllInterfaces() throws Exception {
|
30 | 46 | }
|
31 | 47 | }
|
32 | 48 |
|
33 |
| - @Test |
34 |
| - void checkPortIsFree_checksIpv6Localhost() throws Exception { |
35 |
| - if (!Platform.getCurrent().is(Platform.LINUX)) { |
36 |
| - try (ServerSocket socket = new ServerSocket()) { |
37 |
| - socket.bind(new InetSocketAddress("::1", TEST_PORT)); |
38 |
| - assertThat(PortProber.checkPortIsFree(TEST_PORT)).isEqualTo(-1); |
39 |
| - } |
40 |
| - } |
41 |
| - } |
42 | 49 |
|
43 | 50 | @Test
|
44 | 51 | void checkPortIsFree_checksIpv6AllInterfaces() throws Exception {
|
|
0 commit comments