File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1
samples/snippets/src/test/java/pubsub Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1342,6 +1342,7 @@ public void testPublishOpenTelemetryTracing() throws Exception {
1342
1342
fakeExecutor .advanceTime (Duration .ofSeconds (5 ));
1343
1343
assertEquals ("1" , publishFuture .get ());
1344
1344
fakeExecutor .advanceTime (Duration .ofSeconds (5 ));
1345
+ shutdownTestPublisher (publisher );
1345
1346
1346
1347
List <SpanData > allSpans = openTelemetryTesting .getSpans ();
1347
1348
assertEquals (4 , allSpans .size ());
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ public class AdminIT {
81
81
private static final String cloudStorageInputFormat = "text" ;
82
82
private static final String cloudStorageTextDelimiter = "," ;
83
83
private static final String cloudStorageMatchGlob = "**.txt" ;
84
- private static final String cloudStorageMinimumObjectCreateTime = "1970-01-01T00:00:00Z " ;
85
- private static final String cloudStorageMinimumObjectCreateTimeSeconds = "0 " ;
84
+ private static final String cloudStorageMinimumObjectCreateTime = "1970-01-01T00:00:01Z " ;
85
+ private static final String cloudStorageMinimumObjectCreateTimeSeconds = "seconds: 1 " ;
86
86
87
87
private static final TopicName topicName = TopicName .of (projectId , topicId );
88
88
private static final TopicName kinesisIngestionTopicName =
Original file line number Diff line number Diff line change 39
39
import java .util .List ;
40
40
import java .util .UUID ;
41
41
import org .junit .After ;
42
+ import org .junit .AfterClass ;
42
43
import org .junit .Before ;
43
44
import org .junit .BeforeClass ;
44
45
import org .junit .Rule ;
45
46
import org .junit .Test ;
46
47
import org .junit .rules .Timeout ;
47
48
48
49
public class SubscriberIT {
49
- private ByteArrayOutputStream bout ;
50
- private PrintStream out ;
50
+ private static ByteArrayOutputStream bout ;
51
+ private static PrintStream out ;
51
52
52
53
private static final String projectId = System .getenv ("GOOGLE_CLOUD_PROJECT" );
53
54
private static final String _suffix = UUID .randomUUID ().toString ();
@@ -129,8 +130,8 @@ public static void checkRequirements() {
129
130
requireEnvVar ("GOOGLE_CLOUD_PROJECT" );
130
131
}
131
132
132
- @ Before
133
- public void setUp () throws Exception {
133
+ @ BeforeClass
134
+ public static void setUp () throws Exception {
134
135
bout = new ByteArrayOutputStream ();
135
136
out = new PrintStream (bout );
136
137
System .setOut (out );
@@ -162,8 +163,8 @@ public void setUp() throws Exception {
162
163
}
163
164
}
164
165
165
- @ After
166
- public void tearDown () throws Exception {
166
+ @ AfterClass
167
+ public static void tearDown () throws Exception {
167
168
try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient .create ()) {
168
169
subscriptionAdminClient .deleteSubscription (subscriptionName .toString ());
169
170
subscriptionAdminClient .deleteSubscription (subscriptionEodName .toString ());
You can’t perform that action at this time.
0 commit comments