File tree Expand file tree Collapse file tree 6 files changed +29
-17
lines changed
Expand file tree Collapse file tree 6 files changed +29
-17
lines changed Original file line number Diff line number Diff line change 7777 <artifactId >protobuf-java-util</artifactId >
7878 <version >3.15.3</version >
7979 </dependency >
80+ <dependency >
81+ <groupId >com.google.cloud</groupId >
82+ <artifactId >google-cloud-core</artifactId >
83+ <version >1.94.1</version >
84+ <classifier >tests</classifier >
85+ </dependency >
8086 </dependencies >
8187
8288 <!-- compile and run all snippet tests -->
Original file line number Diff line number Diff line change 7676 <version >1.1.2</version >
7777 <scope >test</scope >
7878 </dependency >
79+ <dependency >
80+ <groupId >com.google.cloud</groupId >
81+ <artifactId >google-cloud-core</artifactId >
82+ <version >1.94.1</version >
83+ <classifier >tests</classifier >
84+ </dependency >
7985 </dependencies >
8086
8187 <!-- compile and run all snippet tests -->
Original file line number Diff line number Diff line change 8787 <version >1.1.2</version >
8888 <scope >test</scope >
8989 </dependency >
90+ <dependency >
91+ <groupId >com.google.cloud</groupId >
92+ <artifactId >google-cloud-core</artifactId >
93+ <version >1.94.1</version >
94+ <classifier >tests</classifier >
95+ </dependency >
9096 <!-- [END_EXCLUDE] -->
9197 </dependencies >
9298 <!-- [END pubsub_install_with_bom] -->
Original file line number Diff line number Diff line change 2323/**
2424 * This file is created using Avro tools.
2525 *
26- * To download, visit https://avro.apache.org/releases.html#Download
26+ * <p> To download, visit https://avro.apache.org/releases.html#Download
2727 *
28- * Run the following command from the `samples/snippets` directory to
29- * generate this class:
28+ * <p>Run the following command from the `samples/snippets` directory to generate this class:
3029 *
31- *`java -jar /location/to/your/avro-tools-1.10.1.jar compile schema src/main/resources/us-states.avsc src/main/java/`
30+ * <p>`java -jar /location/to/your/avro-tools-1.10.1.jar compile schema
31+ * src/main/resources/us-states.avsc src/main/java/`
3232 */
33-
3433package utilities ;
3534
3635import org .apache .avro .message .BinaryMessageDecoder ;
Original file line number Diff line number Diff line change 2020/**
2121 * This file is created using protoc.
2222 *
23- * To download, visit https://developers.google.com/protocol-buffers/docs/downloads
23+ * <p> To download, visit https://developers.google.com/protocol-buffers/docs/downloads
2424 *
25- * Run the following command from the `samples/snippets` directory to
26- * generate this class:
25+ * <p>Run the following command from the `samples/snippets` directory to generate this class:
2726 *
28- *`protoc --proto_path=src/main/resources/ --java_out=src/main/java/ src/main/resources/us-states.proto`
27+ * <p>`protoc --proto_path=src/main/resources/ --java_out=src/main/java/
28+ * src/main/resources/us-states.proto`
2929 */
30-
3130package utilities ;
3231
3332public final class StateProto {
Original file line number Diff line number Diff line change 2323import com .google .cloud .pubsub .v1 .SchemaServiceClient ;
2424import com .google .cloud .pubsub .v1 .SubscriptionAdminClient ;
2525import com .google .cloud .pubsub .v1 .TopicAdminClient ;
26+ import com .google .cloud .testing .junit4 .MultipleAttemptsRule ;
2627import com .google .pubsub .v1 .Encoding ;
2728import com .google .pubsub .v1 .ProjectSubscriptionName ;
2829import com .google .pubsub .v1 .SchemaName ;
3334import java .util .UUID ;
3435import org .junit .After ;
3536import org .junit .Before ;
36- import org .junit .BeforeClass ;
3737import org .junit .Rule ;
3838import org .junit .Test ;
3939import org .junit .rules .Timeout ;
@@ -73,12 +73,8 @@ private static void requireEnvVar(String varName) {
7373 System .getenv (varName ));
7474 }
7575
76- @ Rule public Timeout globalTimeout = Timeout .seconds (300 ); // 5 minute timeout
77-
78- @ BeforeClass
79- public static void checkRequirements () {
80- requireEnvVar ("GOOGLE_CLOUD_PROJECT" );
81- }
76+ @ Rule public Timeout globalTimeout = Timeout .seconds (600 ); // 10 minute timeout
77+ @ Rule public MultipleAttemptsRule retryRule = new MultipleAttemptsRule (/*maxAttemptCount=*/ 3 );
8278
8379 @ Before
8480 public void setUp () {
You can’t perform that action at this time.
0 commit comments