public class LaunchImpl extends Launch
| Modifier and Type | Class and Description |
|---|---|
protected static class |
LaunchImpl.ComputationConcurrentHashMap |
protected static class |
LaunchImpl.TreeItem
Wrapper around TestItem entity to be able to track parent and children items
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CUSTOM_AGENT
Default Agent name for cases where real name is not known.
|
static java.lang.String |
DISABLE_PROPERTY
Environment variable name to disable analytics
|
protected java.util.Queue<io.reactivex.Completable> |
logCompletables |
protected io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.project.config.ProjectSettingsResource> |
projectSettings |
protected LaunchImpl.ComputationConcurrentHashMap |
queue
Messages queue to track items execution order
|
protected com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ |
startRq |
protected java.util.Queue<io.reactivex.disposables.Disposable> |
virtualItemDisposables
Collection of disposables from virtual item subscriptions
|
protected java.util.Map<io.reactivex.Maybe<java.lang.String>,io.reactivex.subjects.PublishSubject<java.lang.String>> |
virtualItems
Mapping between virtual item Maybes and their emitters
|
client, NOOP_LAUNCH, NOT_ISSUE| Modifier | Constructor and Description |
|---|---|
protected |
LaunchImpl(ReportPortalClient reportPortalClient,
ListenerParameters parameters,
io.reactivex.Maybe<java.lang.String> launchMaybe,
java.util.concurrent.ExecutorService executorService) |
protected |
LaunchImpl(ReportPortalClient reportPortalClient,
ListenerParameters parameters,
com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ rq,
java.util.concurrent.ExecutorService executorService) |
protected |
LaunchImpl(ReportPortalClient reportPortalClient,
ListenerParameters parameters,
com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ rq,
java.util.concurrent.ExecutorService executorService,
io.reactivex.FlowableSubscriber<com.epam.ta.reportportal.ws.model.BatchSaveOperatingRS> loggingSubscriber) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
completeIssues(com.epam.ta.reportportal.ws.model.issue.Issue issue)
Lookup for the Issue Type locator in project settings and fill missed external issue fields based on properties.
|
io.reactivex.Completable |
completeLogCompletables()
Marks flow as completed
|
protected io.reactivex.Scheduler |
createScheduler(java.util.concurrent.ExecutorService executorService) |
io.reactivex.Maybe<java.lang.String> |
createVirtualItem()
Creates a virtual test item in ReportPortal.
|
protected io.reactivex.Completable |
createVirtualItemCompletable()
Creates a Completable that polls for completion of all virtual items.
|
void |
finish(com.epam.ta.reportportal.ws.model.FinishExecutionRQ request)
Finishes launch in ReportPortal.
|
io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.OperationCompletionRS> |
finishTestItem(io.reactivex.Maybe<java.lang.String> item,
com.epam.ta.reportportal.ws.model.FinishTestItemRQ request)
Finishes Test Item in ReportPortal asynchronously (non-blocking).
|
java.util.concurrent.ExecutorService |
getExecutor()
Returns a current executor which is used to process launch events such as requests and responses.
|
io.reactivex.Maybe<java.lang.String> |
getLaunch()
Returns current launch UUID promise as
Maybe, empty if the launch is not started. |
io.reactivex.Scheduler |
getScheduler()
Returns a current
Scheduler which is used to process launch events such as requests and responses. |
void |
log(java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
Logs message to the ReportPortal Launch.
|
void |
log(io.reactivex.Maybe<java.lang.String> logItemUuid,
java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
Logs message to the ReportPortal Launch.
|
void |
log(com.epam.ta.reportportal.ws.model.log.SaveLogRQ rq)
Logs message to the ReportPortal Launch.
|
io.reactivex.Maybe<java.lang.String> |
start()
Starts new launch in ReportPortal asynchronously (non-blocking).
|
protected io.reactivex.Maybe<java.lang.String> |
start(boolean statistics)
Starts launch in ReportPortal.
|
io.reactivex.Maybe<java.lang.String> |
startTestItem(io.reactivex.Maybe<java.lang.String> parentId,
io.reactivex.Maybe<java.lang.String> retryOf,
com.epam.ta.reportportal.ws.model.StartTestItemRQ rq)
Starts new test item in ReportPortal asynchronously (non-blocking), ensure provided retry item ID starts first.
|
io.reactivex.Maybe<java.lang.String> |
startTestItem(io.reactivex.Maybe<java.lang.String> parentId,
com.epam.ta.reportportal.ws.model.StartTestItemRQ request)
Starts new test item in ReportPortal asynchronously (non-blocking).
|
io.reactivex.Maybe<java.lang.String> |
startTestItem(com.epam.ta.reportportal.ws.model.StartTestItemRQ request)
Starts new root test item in ReportPortal asynchronously (non-blocking).
|
io.reactivex.Maybe<java.lang.String> |
startVirtualTestItem(io.reactivex.Maybe<java.lang.String> parentId,
io.reactivex.Maybe<java.lang.String> virtualItem,
com.epam.ta.reportportal.ws.model.StartTestItemRQ rq)
Starts new test item in ReportPortal asynchronously (non-blocking) and populates the provided virtual item with the real item ID.
|
io.reactivex.Maybe<java.lang.String> |
startVirtualTestItem(io.reactivex.Maybe<java.lang.String> virtualItem,
com.epam.ta.reportportal.ws.model.StartTestItemRQ rq)
Starts new test item in ReportPortal asynchronously (non-blocking) and populates the provided virtual item with the real item ID.
|
protected void |
waitForCompletable(io.reactivex.Completable... completableTasks)
Executes completion tasks with a timeout.
|
protected void |
waitForItemsCompletion(io.reactivex.Completable itemCompletable)
Waits for completion of all test items including virtual ones and log emitters.
|
currentLaunch, getClient, getParameters, getStepReporterpublic static final java.lang.String DISABLE_PROPERTY
public static final java.lang.String CUSTOM_AGENT
protected final LaunchImpl.ComputationConcurrentHashMap queue
protected final java.util.Map<io.reactivex.Maybe<java.lang.String>,io.reactivex.subjects.PublishSubject<java.lang.String>> virtualItems
protected final java.util.Queue<io.reactivex.disposables.Disposable> virtualItemDisposables
protected final java.util.Queue<io.reactivex.Completable> logCompletables
protected final com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ startRq
protected final io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.project.config.ProjectSettingsResource> projectSettings
protected LaunchImpl(@Nonnull
ReportPortalClient reportPortalClient,
@Nonnull
ListenerParameters parameters,
@Nonnull
com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ rq,
@Nonnull
java.util.concurrent.ExecutorService executorService,
@Nonnull
io.reactivex.FlowableSubscriber<com.epam.ta.reportportal.ws.model.BatchSaveOperatingRS> loggingSubscriber)
protected LaunchImpl(@Nonnull
ReportPortalClient reportPortalClient,
@Nonnull
ListenerParameters parameters,
@Nonnull
com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ rq,
@Nonnull
java.util.concurrent.ExecutorService executorService)
protected LaunchImpl(@Nonnull
ReportPortalClient reportPortalClient,
@Nonnull
ListenerParameters parameters,
@Nonnull
io.reactivex.Maybe<java.lang.String> launchMaybe,
@Nonnull
java.util.concurrent.ExecutorService executorService)
protected io.reactivex.Scheduler createScheduler(java.util.concurrent.ExecutorService executorService)
public java.util.concurrent.ExecutorService getExecutor()
ExecutorServicepublic io.reactivex.Scheduler getScheduler()
Scheduler which is used to process launch events such as requests and responses.Scheduler@Nonnull public io.reactivex.Maybe<java.lang.String> getLaunch()
Maybe, empty if the launch is not started.public io.reactivex.Completable completeLogCompletables()
Completable@Nonnull protected io.reactivex.Maybe<java.lang.String> start(boolean statistics)
statistics - Send or not Launch statistics.@Nonnull public io.reactivex.Maybe<java.lang.String> start()
protected io.reactivex.Completable createVirtualItemCompletable()
protected void waitForCompletable(io.reactivex.Completable... completableTasks)
completableTasks - Completable tasks to executeprotected void waitForItemsCompletion(io.reactivex.Completable itemCompletable)
itemCompletable - A completable representing the test items to be completed before finishing the launchpublic void finish(com.epam.ta.reportportal.ws.model.FinishExecutionRQ request)
@Nonnull public io.reactivex.Maybe<java.lang.String> startTestItem(com.epam.ta.reportportal.ws.model.StartTestItemRQ request)
startTestItem in class Launchrequest - Item start request.@Nonnull
public io.reactivex.Maybe<java.lang.String> startTestItem(io.reactivex.Maybe<java.lang.String> parentId,
io.reactivex.Maybe<java.lang.String> retryOf,
com.epam.ta.reportportal.ws.model.StartTestItemRQ rq)
retry: true and retryOf: {retryOf argument value}.startTestItem in class LaunchparentId - Promise of parent item ID.retryOf - Previous item ID promise, which is retried.rq - Item start request.@Nonnull
public io.reactivex.Maybe<java.lang.String> startTestItem(io.reactivex.Maybe<java.lang.String> parentId,
com.epam.ta.reportportal.ws.model.StartTestItemRQ request)
startTestItem in class LaunchparentId - Promise of parent item ID.request - Item start request.@Nonnull public io.reactivex.Maybe<java.lang.String> createVirtualItem()
createVirtualItem in class Launch@Nonnull
public io.reactivex.Maybe<java.lang.String> startVirtualTestItem(io.reactivex.Maybe<java.lang.String> virtualItem,
com.epam.ta.reportportal.ws.model.StartTestItemRQ rq)
startVirtualTestItem in class LaunchvirtualItem - Virtual item ID promise to populate with real ID.rq - Item start rq.@Nonnull
public io.reactivex.Maybe<java.lang.String> startVirtualTestItem(io.reactivex.Maybe<java.lang.String> parentId,
io.reactivex.Maybe<java.lang.String> virtualItem,
com.epam.ta.reportportal.ws.model.StartTestItemRQ rq)
startVirtualTestItem in class LaunchparentId - Promise of parent item ID.virtualItem - Virtual item ID promise to populate with real ID.rq - Item start request.protected void completeIssues(@Nonnull
com.epam.ta.reportportal.ws.model.issue.Issue issue)
issue - Issue to complete@Nonnull
public io.reactivex.Maybe<com.epam.ta.reportportal.ws.model.OperationCompletionRS> finishTestItem(io.reactivex.Maybe<java.lang.String> item,
com.epam.ta.reportportal.ws.model.FinishTestItemRQ request)
finishTestItem in class Launchitem - Item ID promise.request - Item finish request.public void log(@Nonnull
com.epam.ta.reportportal.ws.model.log.SaveLogRQ rq)
public void log(@Nonnull
java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
public void log(@Nonnull
io.reactivex.Maybe<java.lang.String> logItemUuid,
@Nonnull
java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)