mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02:00
Use Docker Java API to manage container for WebDriver
Previously we had a few customized Gradle build task to manage the Docker container for provisioning browser and ChromeDriverService used by WebDriver tests. This CL changed to use a java library from testcontainers.org to achieve the same purpose. The main benefit of it is that we can expect to run the WebDriver tests from IDE going forward. Also, this CL refactored the structure of WebDriver related classes to have JUnit rule to manage the lifecycle of WebDriver instance, this is also compatible with the API from testcontainers library. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=241539861
This commit is contained in:
parent
5470414e48
commit
ac74ad3088
29 changed files with 376 additions and 177 deletions
|
@ -82,16 +82,16 @@ public final class NetworkUtils {
|
|||
/**
|
||||
* Returns the externally-facing IPv4 network address of the local host.
|
||||
*
|
||||
* <p>This function implements a workaround for an
|
||||
* <a href="http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4665037">issue</a> in
|
||||
* {@link InetAddress#getLocalHost}.
|
||||
* <p>This function implements a workaround for an <a
|
||||
* href="http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4665037">issue</a> in {@link
|
||||
* InetAddress#getLocalHost}.
|
||||
*
|
||||
* <p><b>Note:</b> This code was pilfered from {@link "com.google.net.base.LocalHost"} which was
|
||||
* never made open source.
|
||||
*
|
||||
* @throws UnknownHostException if the local host could not be resolved into an address
|
||||
*/
|
||||
private static InetAddress getExternalAddressOfLocalSystem() throws UnknownHostException {
|
||||
public static InetAddress getExternalAddressOfLocalSystem() throws UnknownHostException {
|
||||
InetAddress localhost = InetAddress.getLocalHost();
|
||||
// If we have a loopback address, look for an address using the network cards.
|
||||
if (localhost.isLoopbackAddress()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue