Skip to content

Commit

Permalink
fix: Add explicit RunWith annotations on all tests (#1004)
Browse files Browse the repository at this point in the history
* 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 <bpcreech@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 18, 2022
1 parent 765dd89 commit 342157f
Show file tree
Hide file tree
Showing 23 changed files with 69 additions and 0 deletions.
Expand Up @@ -38,7 +38,10 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class AutoPopulateMetadataTests {

private static final String LOG_NAME = "test-log";
Expand Down
Expand Up @@ -23,8 +23,11 @@
import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.threeten.bp.Duration;

@RunWith(JUnit4.class)
public class ContextTest {

private static final HttpRequest.RequestMethod REQUEST_METHOD = HttpRequest.RequestMethod.GET;
Expand Down
Expand Up @@ -23,8 +23,11 @@

import com.google.cloud.logging.HttpRequest.RequestMethod;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.threeten.bp.Duration;

@RunWith(JUnit4.class)
public class HttpRequestTest {

private static final RequestMethod REQUEST_METHOD = RequestMethod.GET;
Expand Down
Expand Up @@ -32,7 +32,10 @@
import java.util.Map;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class InstrumentationTest {
private static final StringPayload STRING_PAYLOAD = StringPayload.of("payload");
private static final LogEntry STRING_ENTRY = LogEntry.newBuilder(STRING_PAYLOAD).build();
Expand Down
Expand Up @@ -30,7 +30,10 @@
import java.time.Instant;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
@SuppressWarnings("deprecation")
public class LogEntryTest {

Expand Down
Expand Up @@ -46,7 +46,10 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
@SuppressWarnings("deprecation")
public class LoggingHandlerTest {

Expand Down
Expand Up @@ -87,7 +87,10 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class LoggingImplTest {

private static final String PROJECT = "project";
Expand Down
Expand Up @@ -21,7 +21,10 @@

import java.util.logging.Level;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class LoggingLevelTest {

@Test
Expand Down
Expand Up @@ -21,7 +21,10 @@

import com.google.cloud.TransportOptions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class LoggingOptionsTest {
private static final Boolean DONT_AUTO_POPULATE_METADATA = false;
private static final String PROJECT_ID = "fake-project-id";
Expand Down
Expand Up @@ -29,7 +29,10 @@
import com.google.logging.v2.ListLogEntriesRequest;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class LoggingTest {

private static final int PAGE_SIZE = 42;
Expand Down
Expand Up @@ -20,7 +20,10 @@
import static org.junit.Assert.assertNull;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class MetricInfoTest {

private static final String NAME = "name";
Expand Down
Expand Up @@ -31,7 +31,10 @@
import java.util.concurrent.ExecutionException;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class MetricTest {

private static final String NAME = "name";
Expand Down
Expand Up @@ -30,7 +30,10 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class MonitoredResourceUtilTest {
private static final String MOCKED_PROJECT_ID = "mocked-project-id";
private static final String MOCKED_ZONE = "mocked-zone-id";
Expand Down
Expand Up @@ -21,7 +21,10 @@
import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class OperationTest {

private static final String ID = "id";
Expand Down
Expand Up @@ -24,7 +24,10 @@
import com.google.cloud.logging.Option.OptionType;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class OptionTest {

private static final OptionType OPTION_TYPE = ListOption.OptionType.PAGE_SIZE;
Expand Down
Expand Up @@ -34,7 +34,10 @@
import java.util.List;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class PayloadTest {

private static final String STRING_DATA = "string";
Expand Down
Expand Up @@ -36,7 +36,10 @@
import com.google.protobuf.Any;
import com.google.protobuf.Empty;
import java.io.Serializable;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class SerializationTest extends BaseSerializationTest {

private static final Logging LOGGING =
Expand Down
Expand Up @@ -27,7 +27,10 @@
import com.google.cloud.logging.SinkInfo.Destination.TopicDestination;
import com.google.cloud.logging.SinkInfo.VersionFormat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class SinkInfoTest {

private static final String NAME = "name";
Expand Down
Expand Up @@ -33,7 +33,10 @@
import java.util.concurrent.ExecutionException;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class SinkTest {

private static final String NAME = "sink";
Expand Down
Expand Up @@ -20,7 +20,10 @@
import static org.junit.Assert.assertNull;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class SourceLocationTest {

private static final String FILE = "file";
Expand Down
Expand Up @@ -32,7 +32,10 @@
import java.util.Map;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class StructsTest {

private static final Double NUMBER = 42.0;
Expand Down
Expand Up @@ -29,7 +29,10 @@
import com.google.protobuf.Duration;
import org.easymock.EasyMock;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class TailLogEntriesTest {
private static final String WINDOW = "20s";
private static final Duration WINDOW_DURATION = Duration.newBuilder().setSeconds(20).build();
Expand Down
Expand Up @@ -24,7 +24,10 @@
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class TimestampDefaultFilterTest {

@Test
Expand Down

0 comments on commit 342157f

Please sign in to comment.