Skip to content

Commit

Permalink
Merge pull request #139 from reportportal/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
HardNorth authored Dec 14, 2020
2 parents aff4ad9 + 6d8f45a commit fc69a2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Fixed
- All client threads now marked as daemon to not prevent JVM shutting down

## [5.0.16]
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ protected ExecutorService buildExecutorService(ListenerParameters params) {
}

private static ExecutorService buildExecutorService(ListenerParameters params) {
return Executors.newFixedThreadPool(params.getIoPoolSize(), new ThreadFactoryBuilder().setNameFormat("rp-io-%s").build());
return Executors.newFixedThreadPool(params.getIoPoolSize(), new ThreadFactoryBuilder().setNameFormat("rp-io-%s").setDaemon(true)
.build());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.epam.reportportal.utils.properties.SystemAttributesExtractor;
import com.epam.ta.reportportal.ws.model.attribute.ItemAttributeResource;
import com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import io.reactivex.Scheduler;
Expand All @@ -47,7 +48,8 @@ public class AnalyticsService implements Closeable {
private static final String CLIENT_VALUE_FORMAT = "Client name \"%s\", version \"%s\"";
private static final String AGENT_VALUE_FORMAT = "Agent name \"%s\", version \"%s\"";

private final ExecutorService googleAnalyticsExecutor = Executors.newSingleThreadExecutor();
private final ExecutorService googleAnalyticsExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat(
"rp-stat-%s").setDaemon(true).build());
private final Scheduler scheduler = Schedulers.from(googleAnalyticsExecutor);
private final Analytics analytics;
private final List<Completable> dependencies = new CopyOnWriteArrayList<>();
Expand Down

0 comments on commit fc69a2f

Please sign in to comment.