@@ -193,9 +193,15 @@ public void testFlushLevelConfigSupportsFlushLevelOff() {
193
193
assertThat (foundSeverity ).isEqualTo (null );
194
194
}
195
195
196
+ @ Test
197
+ public void testDefaultFlushLevelOff () {
198
+ loggingAppender .start ();
199
+ Severity foundSeverity = logging .getFlushSeverity ();
200
+ assertThat (foundSeverity ).isEqualTo (null );
201
+ }
202
+
196
203
@ Test
197
204
public void testFilterLogsOnlyLogsAtOrAboveLogLevel () {
198
- logging .setFlushSeverity (Severity .ERROR );
199
205
Capture <Iterable <LogEntry >> capturedArgument = Capture .newInstance ();
200
206
logging .write (
201
207
capture (capturedArgument ),
@@ -223,7 +229,6 @@ public void testFilterLogsOnlyLogsAtOrAboveLogLevel() {
223
229
224
230
@ Test
225
231
public void testPartialSuccessOverrideHasExpectedValue () {
226
- logging .setFlushSeverity (Severity .ERROR );
227
232
Capture <WriteOption > logNameArg = Capture .newInstance ();
228
233
Capture <WriteOption > resourceArg = Capture .newInstance ();
229
234
Capture <WriteOption > partialSuccessArg = Capture .newInstance ();
@@ -247,7 +252,6 @@ public void testPartialSuccessOverrideHasExpectedValue() {
247
252
248
253
@ Test
249
254
public void testDefaultWriteOptionsHasExpectedDefaults () {
250
- logging .setFlushSeverity (Severity .ERROR );
251
255
Capture <WriteOption > partialSuccessArg = Capture .newInstance ();
252
256
logging .write (
253
257
EasyMock .<Iterable <LogEntry >>anyObject (),
@@ -266,7 +270,6 @@ public void testDefaultWriteOptionsHasExpectedDefaults() {
266
270
267
271
@ Test
268
272
public void testMdcValuesAreConvertedToLabels () {
269
- logging .setFlushSeverity (Severity .ERROR );
270
273
Capture <Iterable <LogEntry >> capturedArgument = Capture .newInstance ();
271
274
logging .write (
272
275
capture (capturedArgument ),
@@ -325,7 +328,6 @@ public void testMdcValuesAreConvertedToLabelsWithPassingNullValues() {
325
328
MDC .put ("mdc1" , "value1" );
326
329
MDC .put ("mdc2" , null );
327
330
MDC .put ("mdc3" , "value3" );
328
- logging .setFlushSeverity (Severity .ERROR );
329
331
Capture <Iterable <LogEntry >> capturedArgument = Capture .newInstance ();
330
332
logging .write (
331
333
capture (capturedArgument ),
@@ -351,7 +353,6 @@ public void testMdcValuesAreConvertedToLabelsWithPassingNullValues() {
351
353
@ Test
352
354
public void testAddCustomLoggingEventEnhancers () {
353
355
MDC .put ("mdc1" , "value1" );
354
- logging .setFlushSeverity (Severity .ERROR );
355
356
Capture <Iterable <LogEntry >> capturedArgument = Capture .newInstance ();
356
357
logging .write (
357
358
capture (capturedArgument ),
@@ -375,7 +376,6 @@ public void testAddCustomLoggingEventEnhancers() {
375
376
376
377
@ Test
377
378
public void testAddCustomLoggingEnhancer () {
378
- logging .setFlushSeverity (Severity .ERROR );
379
379
Capture <Iterable <LogEntry >> capturedArgument = Capture .newInstance ();
380
380
logging .write (
381
381
capture (capturedArgument ),
@@ -398,7 +398,6 @@ public void testAddCustomLoggingEnhancer() {
398
398
@ Test
399
399
@ SuppressWarnings ("deprecation" )
400
400
public void testFlush () {
401
- logging .setFlushSeverity (Severity .ERROR );
402
401
logging .write (
403
402
EasyMock .<Iterable <LogEntry >>anyObject (),
404
403
anyObject (WriteOption .class ),
@@ -419,7 +418,6 @@ public void testFlush() {
419
418
420
419
@ Test
421
420
public void testAutoPopulationEnabled () {
422
- logging .setFlushSeverity (Severity .ERROR );
423
421
Capture <Iterable <LogEntry >> capturedLogEntries = Capture .newInstance ();
424
422
EasyMock .expect (
425
423
logging .populateMetadata (
@@ -458,7 +456,6 @@ public void testAutoPopulationEnabled() {
458
456
459
457
@ Test
460
458
public void testRedirectToStdoutEnabled () {
461
- logging .setFlushSeverity (Severity .ERROR );
462
459
EasyMock .expect (
463
460
logging .populateMetadata (
464
461
EasyMock .<Iterable <LogEntry >>anyObject (),
@@ -503,7 +500,6 @@ public void testRedirectToStdoutDisabled() {
503
500
public void testFDiagnosticInfoAdded () {
504
501
LoggingAppender .setInstrumentationStatus (false );
505
502
Capture <Iterable <LogEntry >> capturedArgument = Capture .newInstance ();
506
- logging .setFlushSeverity (Severity .ERROR );
507
503
logging .write (
508
504
capture (capturedArgument ),
509
505
anyObject (WriteOption .class ),
@@ -547,7 +543,6 @@ public void testFDiagnosticInfoAdded() {
547
543
548
544
@ Test
549
545
public void testFDiagnosticInfoNotAdded () {
550
- logging .setFlushSeverity (Severity .ERROR );
551
546
Capture <Iterable <LogEntry >> capturedArgument = Capture .newInstance ();
552
547
logging .write (
553
548
capture (capturedArgument ),
0 commit comments