File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/test/java/com/google/devtools/build/lib/starlarkdebug/server Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ java_test(
86
86
"//src/main/java/com/google/devtools/build/lib/vfs" ,
87
87
"//src/main/java/com/google/devtools/build/skyframe" ,
88
88
"//src/test/java/com/google/devtools/build/lib/buildtool/util" ,
89
+ "//src/test/java/com/google/devtools/build/lib/remote/util:integration_test_utils" ,
89
90
"//src/test/java/com/google/devtools/build/lib/testutil:JunitUtils" ,
90
91
"//third_party:guava" ,
91
92
"//third_party:junit4" ,
Original file line number Diff line number Diff line change 27
27
import com .google .devtools .build .lib .events .Event ;
28
28
import com .google .devtools .build .lib .events .EventCollector ;
29
29
import com .google .devtools .build .lib .events .EventKind ;
30
+ import com .google .devtools .build .lib .remote .util .IntegrationTestUtils ;
30
31
import com .google .devtools .build .lib .runtime .BlazeRuntime ;
31
32
import com .google .devtools .build .lib .starlarkdebug .module .StarlarkDebuggerModule ;
32
33
import com .google .devtools .build .lib .starlarkdebugging .StarlarkDebuggingProtos .Breakpoint ;
62
63
public class StarlarkDebugIntegrationTest extends BuildIntegrationTestCase {
63
64
private static final AtomicInteger sequenceIds = new AtomicInteger (1 );
64
65
65
- private static final int DEBUG_PORT = 7300 ;
66
+ private static final int DEBUG_PORT = getRandomPort ();
67
+
68
+ private static int getRandomPort () {
69
+ try {
70
+ return IntegrationTestUtils .pickUnusedRandomPort ();
71
+ } catch (IOException | InterruptedException e ) {
72
+ throw new RuntimeException (e );
73
+ }
74
+ }
66
75
67
76
private final ExecutorService executor = Executors .newFixedThreadPool (1 );
68
77
private final Collection <Event > eventCollector = new ConcurrentLinkedQueue <>();
You can’t perform that action at this time.
0 commit comments