File tree Expand file tree Collapse file tree
dataflow/spanner-io/src/test/java/com/example/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939import java .util .ArrayList ;
4040import java .util .Arrays ;
4141import java .util .List ;
42+ import java .util .Random ;
43+ import java .util .UUID ;
4244import java .util .stream .Collectors ;
4345import java .util .stream .IntStream ;
4446import javax .annotation .Nullable ;
4951@ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
5052public class SpannerGroupWriteIT {
5153
54+ private final Random random = new Random ();
5255 private String instanceId ;
5356 private String databaseId ;
5457
@@ -59,7 +62,7 @@ public class SpannerGroupWriteIT {
5962 @ Before
6063 public void setUp () throws Exception {
6164 instanceId = System .getProperty ("spanner.test.instance" );
62- databaseId = "df-spanner-groupwrite -it" ;
65+ databaseId = "df-spanner-gwrite -it-" + random . nextInt ( 1000000000 ) ;
6366
6467 spannerOptions = SpannerOptions .getDefaultInstance ();
6568 spanner = spannerOptions .getService ();
Original file line number Diff line number Diff line change 3434import java .nio .file .Path ;
3535import java .util .Arrays ;
3636import java .util .List ;
37+ import java .util .Random ;
38+ import java .util .UUID ;
3739import java .util .concurrent .ExecutionException ;
3840import java .util .stream .Collectors ;
3941import javax .annotation .Nullable ;
4446@ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
4547public class SpannerReadIT {
4648
49+ private final Random random = new Random ();
4750 private String instanceId ;
4851 private String databaseId ;
4952
@@ -53,7 +56,7 @@ public class SpannerReadIT {
5356 @ Before
5457 public void setUp () throws InterruptedException , ExecutionException {
5558 instanceId = System .getProperty ("spanner.test.instance" );
56- databaseId = "df-spanner-read-it" ;
59+ databaseId = "df-spanner-read-it-" + random . nextInt ( 1000000000 ) ;
5760
5861 spannerOptions = SpannerOptions .getDefaultInstance ();
5962 spanner = spannerOptions .getService ();
Original file line number Diff line number Diff line change 3434import java .nio .file .Files ;
3535import java .nio .file .Path ;
3636import java .util .Arrays ;
37+ import java .util .Random ;
38+ import java .util .UUID ;
3739import java .util .stream .Collectors ;
3840import java .util .stream .Stream ;
3941import org .junit .After ;
4345@ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
4446public class SpannerWriteIT {
4547
48+ private final Random random = new Random ();
4649 private String instanceId ;
4750 private String databaseId ;
4851
@@ -55,7 +58,7 @@ public class SpannerWriteIT {
5558 public void setUp () throws Exception {
5659
5760 instanceId = System .getProperty ("spanner.test.instance" );
58- databaseId = "df-spanner-write-it" ;
61+ databaseId = "df-spanner-write-it-" + random . nextInt ( 1000000000 ) ;
5962
6063 spannerOptions = SpannerOptions .getDefaultInstance ();
6164 spanner = spannerOptions .getService ();
You can’t perform that action at this time.
0 commit comments