Revert "webflux-form sample uses Tomcat"

This reverts commit 67bb91bb76.

We can use Netty again now that reactor/reactor-netty#248 has
been resolved.

Fixes: gh-4923
This commit is contained in:
Rob Winch
2018-01-23 08:30:13 -06:00
parent 6a0833165a
commit fe40952908
3 changed files with 15 additions and 37 deletions

View File

@@ -28,20 +28,17 @@ import org.springframework.test.context.junit4.SpringRunner;
import sample.webdriver.IndexPage;
import sample.webdriver.LoginPage;
import java.io.IOException;
import java.net.ServerSocket;
/**
* @author Rob Winch
* @since 5.0
*/
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = WebfluxFormApplication.class)
@TestPropertySource(properties = "server.port=#{T(sample.WebfluxFormApplicationTests).availablePort()}")
@TestPropertySource(properties = "server.port=0")
public class WebfluxFormApplicationTests {
WebDriver driver;
@Value("#{@tomcat.server.port}")
@Value("#{@nettyContext.address().getPort()}")
int port;
@Before
@@ -79,12 +76,4 @@ public class WebfluxFormApplicationTests {
.assertAt()
.assertLogout();
}
public static final int availablePort() {
try(ServerSocket socket = new ServerSocket(0)) {
return socket.getLocalPort();
} catch(IOException e) {
throw new RuntimeException(e);
}
}
}