File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
smoke-tests/framework/src/main/java/com/microsoft/applicationinsights/smoketest Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -194,15 +194,6 @@ private void beforeAllInternal(ExtensionContext context) throws Exception {
194194 prepareEnvironment (environment );
195195 }
196196
197- @ Override
198- public void testFailed (ExtensionContext context , Throwable cause ) {
199- if (targetContainer != null ) {
200- System .out .println ("Test failure detected." );
201- System .out .println ("Container logs:" );
202- System .out .println (targetContainer .getLogs ());
203- }
204- }
205-
206197 private void prepareEnvironment (Environment environment ) throws Exception {
207198 System .out .println ("Preparing environment..." );
208199 currentEnvironment = environment .value ();
@@ -529,6 +520,11 @@ public void afterEach(ExtensionContext context) {
529520 @ Override
530521 public void afterAll (ExtensionContext context ) throws Exception {
531522 if (allContainers != null ) {
523+ if (targetContainer != null ) {
524+ System .out .println ("Test failure detected." );
525+ System .out .println ("Container logs:" );
526+ System .out .println (targetContainer .getLogs ());
527+ }
532528 System .out .println ("Stopping containers..." );
533529 for (GenericContainer <?> container : allContainers ) {
534530 container .stop ();
You can’t perform that action at this time.
0 commit comments