Skip to content

Commit 7e9e319

Browse files
authored
Merge pull request #117 from reportportal/develop
Release
2 parents 95ec172 + 0e0a952 commit 7e9e319

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/test/java/com/epam/reportportal/junit/utils/TestUtils.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@
1717
package com.epam.reportportal.junit.utils;
1818

1919
import com.epam.reportportal.listeners.ListenerParameters;
20+
import com.epam.reportportal.service.Launch;
2021
import com.epam.reportportal.service.ReportPortalClient;
2122
import com.epam.reportportal.util.test.CommonUtils;
2223
import com.epam.reportportal.utils.http.HttpRequestUtils;
23-
import com.epam.ta.reportportal.ws.model.BatchSaveOperatingRS;
24-
import com.epam.ta.reportportal.ws.model.Constants;
25-
import com.epam.ta.reportportal.ws.model.EntryCreatedAsyncRS;
26-
import com.epam.ta.reportportal.ws.model.OperationCompletionRS;
24+
import com.epam.ta.reportportal.ws.model.*;
2725
import com.epam.ta.reportportal.ws.model.item.ItemCreatedRS;
2826
import com.epam.ta.reportportal.ws.model.launch.StartLaunchRS;
2927
import com.epam.ta.reportportal.ws.model.log.SaveLogRQ;
@@ -39,6 +37,7 @@
3937
import org.mockito.stubbing.Answer;
4038

4139
import java.io.IOException;
40+
import java.time.Instant;
4241
import java.util.*;
4342
import java.util.concurrent.TimeUnit;
4443
import java.util.stream.Collectors;
@@ -57,7 +56,11 @@ private TestUtils() {
5756
}
5857

5958
public static Result runClasses(final Class<?>... testClasses) {
60-
return JUnitCore.runClasses(testClasses);
59+
Result results = JUnitCore.runClasses(testClasses);
60+
FinishExecutionRQ finish = new FinishExecutionRQ();
61+
finish.setEndTime(Instant.now());
62+
ofNullable(Launch.currentLaunch()).ifPresent(l -> l.finish(finish));
63+
return results;
6164
}
6265

6366
public static void mockLaunch(@Nonnull final ReportPortalClient client, @Nullable final String launchUuid,

0 commit comments

Comments
 (0)