File tree 23 files changed +69
-0
lines changed
google-cloud-logging/src/test/java/com/google/cloud/logging
23 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 38
38
import org .junit .After ;
39
39
import org .junit .Before ;
40
40
import org .junit .Test ;
41
+ import org .junit .runner .RunWith ;
42
+ import org .junit .runners .JUnit4 ;
41
43
44
+ @ RunWith (JUnit4 .class )
42
45
public class AutoPopulateMetadataTests {
43
46
44
47
private static final String LOG_NAME = "test-log" ;
Original file line number Diff line number Diff line change 23
23
import static org .junit .Assert .assertTrue ;
24
24
25
25
import org .junit .Test ;
26
+ import org .junit .runner .RunWith ;
27
+ import org .junit .runners .JUnit4 ;
26
28
import org .threeten .bp .Duration ;
27
29
30
+ @ RunWith (JUnit4 .class )
28
31
public class ContextTest {
29
32
30
33
private static final HttpRequest .RequestMethod REQUEST_METHOD = HttpRequest .RequestMethod .GET ;
Original file line number Diff line number Diff line change 23
23
24
24
import com .google .cloud .logging .HttpRequest .RequestMethod ;
25
25
import org .junit .Test ;
26
+ import org .junit .runner .RunWith ;
27
+ import org .junit .runners .JUnit4 ;
26
28
import org .threeten .bp .Duration ;
27
29
30
+ @ RunWith (JUnit4 .class )
28
31
public class HttpRequestTest {
29
32
30
33
private static final RequestMethod REQUEST_METHOD = RequestMethod .GET ;
Original file line number Diff line number Diff line change 32
32
import java .util .Map ;
33
33
import org .junit .Assert ;
34
34
import org .junit .Test ;
35
+ import org .junit .runner .RunWith ;
36
+ import org .junit .runners .JUnit4 ;
35
37
38
+ @ RunWith (JUnit4 .class )
36
39
public class InstrumentationTest {
37
40
private static final StringPayload STRING_PAYLOAD = StringPayload .of ("payload" );
38
41
private static final LogEntry STRING_ENTRY = LogEntry .newBuilder (STRING_PAYLOAD ).build ();
Original file line number Diff line number Diff line change 30
30
import java .time .Instant ;
31
31
import java .util .Map ;
32
32
import org .junit .Test ;
33
+ import org .junit .runner .RunWith ;
34
+ import org .junit .runners .JUnit4 ;
33
35
36
+ @ RunWith (JUnit4 .class )
34
37
@ SuppressWarnings ("deprecation" )
35
38
public class LogEntryTest {
36
39
Original file line number Diff line number Diff line change 46
46
import org .junit .After ;
47
47
import org .junit .Before ;
48
48
import org .junit .Test ;
49
+ import org .junit .runner .RunWith ;
50
+ import org .junit .runners .JUnit4 ;
49
51
52
+ @ RunWith (JUnit4 .class )
50
53
@ SuppressWarnings ("deprecation" )
51
54
public class LoggingHandlerTest {
52
55
Original file line number Diff line number Diff line change 87
87
import org .junit .After ;
88
88
import org .junit .Before ;
89
89
import org .junit .Test ;
90
+ import org .junit .runner .RunWith ;
91
+ import org .junit .runners .JUnit4 ;
90
92
93
+ @ RunWith (JUnit4 .class )
91
94
public class LoggingImplTest {
92
95
93
96
private static final String PROJECT = "project" ;
Original file line number Diff line number Diff line change 21
21
22
22
import java .util .logging .Level ;
23
23
import org .junit .Test ;
24
+ import org .junit .runner .RunWith ;
25
+ import org .junit .runners .JUnit4 ;
24
26
27
+ @ RunWith (JUnit4 .class )
25
28
public class LoggingLevelTest {
26
29
27
30
@ Test
Original file line number Diff line number Diff line change 21
21
22
22
import com .google .cloud .TransportOptions ;
23
23
import org .junit .Test ;
24
+ import org .junit .runner .RunWith ;
25
+ import org .junit .runners .JUnit4 ;
24
26
27
+ @ RunWith (JUnit4 .class )
25
28
public class LoggingOptionsTest {
26
29
private static final Boolean DONT_AUTO_POPULATE_METADATA = false ;
27
30
private static final String PROJECT_ID = "fake-project-id" ;
Original file line number Diff line number Diff line change 29
29
import com .google .logging .v2 .ListLogEntriesRequest ;
30
30
import java .util .Map ;
31
31
import org .junit .Test ;
32
+ import org .junit .runner .RunWith ;
33
+ import org .junit .runners .JUnit4 ;
32
34
35
+ @ RunWith (JUnit4 .class )
33
36
public class LoggingTest {
34
37
35
38
private static final int PAGE_SIZE = 42 ;
Original file line number Diff line number Diff line change 20
20
import static org .junit .Assert .assertNull ;
21
21
22
22
import org .junit .Test ;
23
+ import org .junit .runner .RunWith ;
24
+ import org .junit .runners .JUnit4 ;
23
25
26
+ @ RunWith (JUnit4 .class )
24
27
public class MetricInfoTest {
25
28
26
29
private static final String NAME = "name" ;
Original file line number Diff line number Diff line change 31
31
import java .util .concurrent .ExecutionException ;
32
32
import org .junit .After ;
33
33
import org .junit .Test ;
34
+ import org .junit .runner .RunWith ;
35
+ import org .junit .runners .JUnit4 ;
34
36
37
+ @ RunWith (JUnit4 .class )
35
38
public class MetricTest {
36
39
37
40
private static final String NAME = "name" ;
Original file line number Diff line number Diff line change 30
30
import org .junit .After ;
31
31
import org .junit .Before ;
32
32
import org .junit .Test ;
33
+ import org .junit .runner .RunWith ;
34
+ import org .junit .runners .JUnit4 ;
33
35
36
+ @ RunWith (JUnit4 .class )
34
37
public class MonitoredResourceUtilTest {
35
38
private static final String MOCKED_PROJECT_ID = "mocked-project-id" ;
36
39
private static final String MOCKED_ZONE = "mocked-zone-id" ;
Original file line number Diff line number Diff line change 21
21
import static org .junit .Assert .assertTrue ;
22
22
23
23
import org .junit .Test ;
24
+ import org .junit .runner .RunWith ;
25
+ import org .junit .runners .JUnit4 ;
24
26
27
+ @ RunWith (JUnit4 .class )
25
28
public class OperationTest {
26
29
27
30
private static final String ID = "id" ;
Original file line number Diff line number Diff line change 24
24
import com .google .cloud .logging .Option .OptionType ;
25
25
import org .junit .Assert ;
26
26
import org .junit .Test ;
27
+ import org .junit .runner .RunWith ;
28
+ import org .junit .runners .JUnit4 ;
27
29
30
+ @ RunWith (JUnit4 .class )
28
31
public class OptionTest {
29
32
30
33
private static final OptionType OPTION_TYPE = ListOption .OptionType .PAGE_SIZE ;
Original file line number Diff line number Diff line change 34
34
import java .util .List ;
35
35
import java .util .Map ;
36
36
import org .junit .Test ;
37
+ import org .junit .runner .RunWith ;
38
+ import org .junit .runners .JUnit4 ;
37
39
40
+ @ RunWith (JUnit4 .class )
38
41
public class PayloadTest {
39
42
40
43
private static final String STRING_DATA = "string" ;
Original file line number Diff line number Diff line change 36
36
import com .google .protobuf .Any ;
37
37
import com .google .protobuf .Empty ;
38
38
import java .io .Serializable ;
39
+ import org .junit .runner .RunWith ;
40
+ import org .junit .runners .JUnit4 ;
39
41
42
+ @ RunWith (JUnit4 .class )
40
43
public class SerializationTest extends BaseSerializationTest {
41
44
42
45
private static final Logging LOGGING =
Original file line number Diff line number Diff line change 27
27
import com .google .cloud .logging .SinkInfo .Destination .TopicDestination ;
28
28
import com .google .cloud .logging .SinkInfo .VersionFormat ;
29
29
import org .junit .Test ;
30
+ import org .junit .runner .RunWith ;
31
+ import org .junit .runners .JUnit4 ;
30
32
33
+ @ RunWith (JUnit4 .class )
31
34
public class SinkInfoTest {
32
35
33
36
private static final String NAME = "name" ;
Original file line number Diff line number Diff line change 33
33
import java .util .concurrent .ExecutionException ;
34
34
import org .junit .After ;
35
35
import org .junit .Test ;
36
+ import org .junit .runner .RunWith ;
37
+ import org .junit .runners .JUnit4 ;
36
38
39
+ @ RunWith (JUnit4 .class )
37
40
public class SinkTest {
38
41
39
42
private static final String NAME = "sink" ;
Original file line number Diff line number Diff line change 20
20
import static org .junit .Assert .assertNull ;
21
21
22
22
import org .junit .Test ;
23
+ import org .junit .runner .RunWith ;
24
+ import org .junit .runners .JUnit4 ;
23
25
26
+ @ RunWith (JUnit4 .class )
24
27
public class SourceLocationTest {
25
28
26
29
private static final String FILE = "file" ;
Original file line number Diff line number Diff line change 32
32
import java .util .Map ;
33
33
import org .junit .BeforeClass ;
34
34
import org .junit .Test ;
35
+ import org .junit .runner .RunWith ;
36
+ import org .junit .runners .JUnit4 ;
35
37
38
+ @ RunWith (JUnit4 .class )
36
39
public class StructsTest {
37
40
38
41
private static final Double NUMBER = 42.0 ;
Original file line number Diff line number Diff line change 29
29
import com .google .protobuf .Duration ;
30
30
import org .easymock .EasyMock ;
31
31
import org .junit .Test ;
32
+ import org .junit .runner .RunWith ;
33
+ import org .junit .runners .JUnit4 ;
32
34
35
+ @ RunWith (JUnit4 .class )
33
36
public class TailLogEntriesTest {
34
37
private static final String WINDOW = "20s" ;
35
38
private static final Duration WINDOW_DURATION = Duration .newBuilder ().setSeconds (20 ).build ();
Original file line number Diff line number Diff line change 24
24
import java .time .LocalDateTime ;
25
25
import java .time .format .DateTimeFormatter ;
26
26
import org .junit .Test ;
27
+ import org .junit .runner .RunWith ;
28
+ import org .junit .runners .JUnit4 ;
27
29
30
+ @ RunWith (JUnit4 .class )
28
31
public class TimestampDefaultFilterTest {
29
32
30
33
@ Test
You can’t perform that action at this time.
0 commit comments