File tree Expand file tree Collapse file tree
couchbase/couchbase-common/testing/src/main/java/io/opentelemetry/instrumentation/couchbase/springdata
oshi/library/src/test/java/io/opentelemetry/instrumentation/oshi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818import static io .opentelemetry .semconv .incubating .DbIncubatingAttributes .DbSystemNameIncubatingValues .COUCHBASE ;
1919import static java .util .Collections .singletonList ;
2020import static org .assertj .core .api .Assertions .assertThat ;
21- import static org .junit .jupiter .api .Assertions .assertAll ;
2221import static org .junit .jupiter .api .Named .named ;
2322
2423import com .couchbase .client .java .Bucket ;
@@ -84,8 +83,10 @@ void setUpTemplates() {
8483 }
8584
8685 @ AfterAll
87- void cleanUp () {
88- assertAll (cleanup .stream ().map (closeable -> closeable ::close ));
86+ void cleanUp () throws Exception {
87+ for (AutoCloseable closeable : cleanup ) {
88+ closeable .close ();
89+ }
8990 }
9091
9192 private static Stream <Arguments > templates () {
Original file line number Diff line number Diff line change 66package io .opentelemetry .instrumentation .oshi ;
77
88import static org .assertj .core .api .Assertions .assertThat ;
9- import static org .junit .jupiter .api .Assertions .assertAll ;
109
1110import io .opentelemetry .api .GlobalOpenTelemetry ;
1211import io .opentelemetry .instrumentation .testing .junit .InstrumentationExtension ;
@@ -30,8 +29,10 @@ static void setUp() {
3029 }
3130
3231 @ AfterAll
33- static void tearDown () {
34- assertAll (observables .stream ().map (observable -> observable ::close ));
32+ static void tearDown () throws Exception {
33+ for (AutoCloseable observable : observables ) {
34+ observable .close ();
35+ }
3536 }
3637
3738 @ Override
Original file line number Diff line number Diff line change 66package io .opentelemetry .instrumentation .oshi ;
77
88import static org .assertj .core .api .Assertions .assertThat ;
9- import static org .junit .jupiter .api .Assertions .assertAll ;
109
1110import io .opentelemetry .api .GlobalOpenTelemetry ;
1211import io .opentelemetry .instrumentation .testing .junit .InstrumentationExtension ;
@@ -30,8 +29,10 @@ static void setUp() {
3029 }
3130
3231 @ AfterAll
33- static void tearDown () {
34- assertAll (observables .stream ().map (observable -> observable ::close ));
32+ static void tearDown () throws Exception {
33+ for (AutoCloseable observable : observables ) {
34+ observable .close ();
35+ }
3536 }
3637
3738 @ Override
You can’t perform that action at this time.
0 commit comments