Home
last modified time | relevance | path

Searched refs:port (Results 1 – 5 of 5) sorted by relevance

/platform_testing/libraries/audio-test-harness/server/src/main/java/com/android/media/audiotestharness/server/utility/
DPortUtility.java48 int port; in nextAvailablePort() local
55 port = ThreadLocalRandom.current().nextInt(START_PORT, END_PORT); in nextAvailablePort()
56 if (isPortFree(port)) { in nextAvailablePort()
57 LOGGER.finest(String.format("Found open port (%d) after %d tries", port, count)); in nextAvailablePort()
58 return port; in nextAvailablePort()
71 private static boolean isPortFree(int port) { in isPortFree() argument
75 new ServerSocket(port).close(); in isPortFree()
/platform_testing/libraries/audio-test-harness/server/src/test/java/com/android/media/audiotestharness/server/
DAudioTestHarnessGrpcServerTests.java79 int port = PortUtility.nextAvailablePort(); in open_buildsAndStartsGrpcServerAsExpected() local
81 setUpTestServer(port, Executors.newSingleThreadExecutor()); in open_buildsAndStartsGrpcServerAsExpected()
83 assertPortOpen(port); in open_buildsAndStartsGrpcServerAsExpected()
87 assertServerRunningAsExpected(port); in open_buildsAndStartsGrpcServerAsExpected()
104 int port = PortUtility.nextAvailablePort(); in open_throwsIOException_forPortTaken() local
106 setUpTestServer(port, Executors.newSingleThreadExecutor()); in open_throwsIOException_forPortTaken()
108 new ServerSocket(port); in open_throwsIOException_forPortTaken()
115 int port = PortUtility.nextAvailablePort(); in close_shutsDownGrpcServerAsExpected() local
117 AudioTestHarnessGrpcServer server = setUpTestServer(port, executorService); in close_shutsDownGrpcServerAsExpected()
120 assertServerRunningAsExpected(port); in close_shutsDownGrpcServerAsExpected()
[all …]
/platform_testing/libraries/audio-test-harness/server/src/test/java/com/android/media/audiotestharness/server/utility/
DPortUtilityTests.java34 int port = PortUtility.nextAvailablePort(); in nextAvailablePort_returnsAvailablePortWithinRange_fuzz() local
36 assertTrue(port >= PortUtility.START_PORT); in nextAvailablePort_returnsAvailablePortWithinRange_fuzz()
37 assertTrue(port < PortUtility.END_PORT); in nextAvailablePort_returnsAvailablePortWithinRange_fuzz()
40 new ServerSocket(port).close(); in nextAvailablePort_returnsAvailablePortWithinRange_fuzz()
/platform_testing/libraries/audio-test-harness/server/src/main/java/com/android/media/audiotestharness/server/
DAudioTestHarnessGrpcServer.java75 private AudioTestHarnessGrpcServer(int port, ExecutorService executor, Injector injector) { in AudioTestHarnessGrpcServer() argument
76 LOGGER.finest(String.format("new AudioTestHarnessGrpcServer on Port (%d)", port)); in AudioTestHarnessGrpcServer()
78 this.mPort = port; in AudioTestHarnessGrpcServer()
94 int port, ExecutorService executor, Injector injector) { in create() argument
96 port, in create()
102 public static AudioTestHarnessGrpcServer createOnPort(int port) { in createOnPort() argument
112 return create(port, executor, injector); in createOnPort()
/platform_testing/libraries/audio-test-harness/client-lib/src/main/java/com/android/media/audiotestharness/client/grpc/
DGrpcAudioTestHarnessClient.java97 public Builder setAddress(String hostname, int port) { in setAddress() argument
100 port >= MIN_PORT && port <= MAX_PORT, in setAddress()
104 mPort = port; in setAddress()