[ 
https://issues.apache.org/jira/browse/GEODE-9912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17472191#comment-17472191
 ] 

ASF subversion and git services commented on GEODE-9912:
--------------------------------------------------------

Commit 0f9f23736edea3be62bb0add94a9076009dafc81 in geode's branch 
refs/heads/develop from Dale Emery
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=0f9f237 ]

GEODE-9924: Avoid merging repeat test logs (#7246)

PROBLEM

Our repeat test tasks merge the output from all executions of a given
test class, making it very difficult to diagnose failures in repeat
tests.

CAUSE

In order to run tests repeatedly, our repeat test tasks override Gradle
code to allow a test class to execute more than once. Gradle's test
reporting code does not expect this. It directs the output from each
test to a log associated with the test class name, not with the specific
execution of the test class. This results in merging the outputs from
different executions of the same class.

SOLUTION

Change Gradle to distinguish separate executions of a test class, and to
log the output from each execution separately.

Components:
- New `ExecutionTrackingTestResultProcessor` class: Wraps a given test
  result processor to append an execution identifier (a simple counter)
  to the name of the test class when reporting results. Gradle
  associates the output with this execution-specific name instead of
  with the class name.
- New `ExecutionTrackingTestClassProcessor` class: Wraps a given test
  class processor to report via an
  `ExecutionTrackingTestResultProcessor`.
- Change `RepeatTestExecuter` to use an
  `ExecutionTrackingTestClassProcessor`.

This commit also reverts GEODE-9912, which partially addressed the same
problem by adding an execution ID to each log line from a DUnit ChildVM.
The execution ID made it possible to identify the source of each merged
log line. GEODE-9924 (this commit) makes the changes from GEODE-9912
unnecessary.

NOTES
- Gradle now creates distinct XML and HTML report files for each
  execution of a given test class.
- The test summary HTML page created by Gradle lists each test class
  execution separately. If a class named `FooTest` executes 50 times (as
  in a stress test run), the summary will list `FooTest-01`,
  `FooTest-02`, ..., `FooTest-50` as if they were separate test classes.

> Add unique identifier to DUnit log lines
> ----------------------------------------
>
>                 Key: GEODE-9912
>                 URL: https://issues.apache.org/jira/browse/GEODE-9912
>             Project: Geode
>          Issue Type: Test
>          Components: tests
>            Reporter: Jens Deppe
>            Assignee: Jens Deppe
>            Priority: Major
>              Labels: pull-request-available
>
> Adding an arbitrary random string to DUnit log lines allows to distinguish 
> individual test output for repeated tests. In such cases tests run in 
> parallel and individual test log lines are interleaved making debugging very 
> difficult. So log lines would look something like:
> {noformat}
> [vm0-51ec] [info 2021/12/24 15:43:54.367 UTC  <RMI TCP 
> Connection(1)-10.138.0.70>; tid=0x1d] Reinitializing JarDeploymentService 
> with new working directory: null
> [vm0-47b7] [info 2021/12/24 15:43:54.416 UTC  <RMI TCP 
> Connection(1)-10.138.0.70> tid=0x1d] Reinitializing JarDeploymentService with 
> new working directory: null
> [vm1-47b7] [info 2021/12/24 15:43:54.431 UTC  <RMI TCP 
> Connection(1)-10.138.0.70> tid=0x1d] Received method: 
> org.apache.geode.test.dunit.internal.IdentifiableCallable.call with 0 args on 
> object: IdentifiableCallable(0:start locator in vm0)
>  {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to