Skip to content

Commit 342157f

Browse files
bpcreechBen Creechgcf-owl-bot[bot]
authored
fix: Add explicit RunWith annotations on all tests (#1004)
* fix: Add explicit RunWith annotations on all tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Ben Creech <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 765dd89 commit 342157f

23 files changed

+69
-0
lines changed

google-cloud-logging/src/test/java/com/google/cloud/logging/AutoPopulateMetadataTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
import org.junit.After;
3939
import org.junit.Before;
4040
import org.junit.Test;
41+
import org.junit.runner.RunWith;
42+
import org.junit.runners.JUnit4;
4143

44+
@RunWith(JUnit4.class)
4245
public class AutoPopulateMetadataTests {
4346

4447
private static final String LOG_NAME = "test-log";

google-cloud-logging/src/test/java/com/google/cloud/logging/ContextTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
import static org.junit.Assert.assertTrue;
2424

2525
import org.junit.Test;
26+
import org.junit.runner.RunWith;
27+
import org.junit.runners.JUnit4;
2628
import org.threeten.bp.Duration;
2729

30+
@RunWith(JUnit4.class)
2831
public class ContextTest {
2932

3033
private static final HttpRequest.RequestMethod REQUEST_METHOD = HttpRequest.RequestMethod.GET;

google-cloud-logging/src/test/java/com/google/cloud/logging/HttpRequestTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323

2424
import com.google.cloud.logging.HttpRequest.RequestMethod;
2525
import org.junit.Test;
26+
import org.junit.runner.RunWith;
27+
import org.junit.runners.JUnit4;
2628
import org.threeten.bp.Duration;
2729

30+
@RunWith(JUnit4.class)
2831
public class HttpRequestTest {
2932

3033
private static final RequestMethod REQUEST_METHOD = RequestMethod.GET;

google-cloud-logging/src/test/java/com/google/cloud/logging/InstrumentationTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
import java.util.Map;
3333
import org.junit.Assert;
3434
import org.junit.Test;
35+
import org.junit.runner.RunWith;
36+
import org.junit.runners.JUnit4;
3537

38+
@RunWith(JUnit4.class)
3639
public class InstrumentationTest {
3740
private static final StringPayload STRING_PAYLOAD = StringPayload.of("payload");
3841
private static final LogEntry STRING_ENTRY = LogEntry.newBuilder(STRING_PAYLOAD).build();

google-cloud-logging/src/test/java/com/google/cloud/logging/LogEntryTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
import java.time.Instant;
3131
import java.util.Map;
3232
import org.junit.Test;
33+
import org.junit.runner.RunWith;
34+
import org.junit.runners.JUnit4;
3335

36+
@RunWith(JUnit4.class)
3437
@SuppressWarnings("deprecation")
3538
public class LogEntryTest {
3639

google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingHandlerTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646
import org.junit.After;
4747
import org.junit.Before;
4848
import org.junit.Test;
49+
import org.junit.runner.RunWith;
50+
import org.junit.runners.JUnit4;
4951

52+
@RunWith(JUnit4.class)
5053
@SuppressWarnings("deprecation")
5154
public class LoggingHandlerTest {
5255

google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@
8787
import org.junit.After;
8888
import org.junit.Before;
8989
import org.junit.Test;
90+
import org.junit.runner.RunWith;
91+
import org.junit.runners.JUnit4;
9092

93+
@RunWith(JUnit4.class)
9194
public class LoggingImplTest {
9295

9396
private static final String PROJECT = "project";

google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingLevelTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121

2222
import java.util.logging.Level;
2323
import org.junit.Test;
24+
import org.junit.runner.RunWith;
25+
import org.junit.runners.JUnit4;
2426

27+
@RunWith(JUnit4.class)
2528
public class LoggingLevelTest {
2629

2730
@Test

google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingOptionsTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121

2222
import com.google.cloud.TransportOptions;
2323
import org.junit.Test;
24+
import org.junit.runner.RunWith;
25+
import org.junit.runners.JUnit4;
2426

27+
@RunWith(JUnit4.class)
2528
public class LoggingOptionsTest {
2629
private static final Boolean DONT_AUTO_POPULATE_METADATA = false;
2730
private static final String PROJECT_ID = "fake-project-id";

google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
import com.google.logging.v2.ListLogEntriesRequest;
3030
import java.util.Map;
3131
import org.junit.Test;
32+
import org.junit.runner.RunWith;
33+
import org.junit.runners.JUnit4;
3234

35+
@RunWith(JUnit4.class)
3336
public class LoggingTest {
3437

3538
private static final int PAGE_SIZE = 42;

0 commit comments

Comments
 (0)