Skip to content

Commit

Permalink
Do not fail parent, leave it on RP side
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Dec 5, 2023
1 parent 2d56c33 commit 4d8c3c4
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,16 +429,14 @@ public void reportFixtureError(@Nonnull SpecInfo spec, @Nullable FeatureInfo fea

protected void logError(@Nonnull ErrorInfo error) {
Throwable exception = error.getException();
LoggerFactory.getLogger(error.getMethod().getReflection().getDeclaringClass()).error(exception.getLocalizedMessage(), exception);
ReportPortal.sendStackTraceToRP(exception);
}

public void reportError(@Nonnull ErrorInfo error) {
MethodInfo method = error.getMethod();
MethodKind kind = error.getMethod().getKind();
if (FEATURE == kind || FEATURE_EXECUTION == kind) {
ofNullable(launchContext.findFeatureFootprint(method.getFeature())).ifPresent(f -> f.setStatus(FAILED));
ofNullable(launchContext.getRuntimePointerForSpec(method.getParent())
.getCurrentIteration()).map(launchContext::findIterationFootprint).ifPresent(i -> i.setStatus(FAILED));
logError(error);
} else if (ITERATION_EXECUTION == kind) {
ofNullable(launchContext.findIterationFootprint(method.getIteration())).ifPresent(i -> i.setStatus(FAILED));
Expand Down

0 comments on commit 4d8c3c4

Please sign in to comment.