-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from cqse/ts/34273_gradle_partition
TS-34273 Fix Gradle plugin partition evaluation
- Loading branch information
Showing
14 changed files
with
217 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
common-system-test/src/main/java/com/teamscale/test/commons/ExternalReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.teamscale.test.commons; | ||
|
||
/** Holds a single report that was uploaded to our fake Teamscale server. */ | ||
public class ExternalReport { | ||
private final String reportString; | ||
private final String partition; | ||
|
||
public ExternalReport(String reportString, String partition) { | ||
this.reportString = reportString; | ||
this.partition = partition; | ||
} | ||
|
||
public String getReportString() { | ||
return reportString; | ||
} | ||
|
||
public String getPartition() { | ||
return partition; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...ted-test-engine/src/test/java/com/teamscale/test_impacted/engine/NoImpactedTestsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.teamscale.test_impacted.engine; | ||
|
||
import com.teamscale.client.PrioritizableTestCluster; | ||
import com.teamscale.test_impacted.engine.executor.DummyEngine; | ||
import com.teamscale.test_impacted.test_descriptor.JUnitJupiterTestDescriptorResolver; | ||
import org.junit.platform.engine.EngineExecutionListener; | ||
import org.junit.platform.engine.TestDescriptor; | ||
import org.junit.platform.engine.TestEngine; | ||
import org.junit.platform.engine.UniqueId; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import static com.teamscale.test_impacted.engine.executor.SimpleTestDescriptor.testCase; | ||
import static com.teamscale.test_impacted.engine.executor.SimpleTestDescriptor.testContainer; | ||
import static java.util.Collections.singletonList; | ||
|
||
/** Test setup where no test is impacted. */ | ||
class NoImpactedTestsTest extends ImpactedTestEngineTestBase { | ||
|
||
private static final String FIRST_TEST_CLASS = "FirstTestClass"; | ||
private static final String NON_IMPACTED_TEST_CASE_1 = "nonImpactedTestCase1()"; | ||
/** | ||
* For this test setup we rely on the {@link JUnitJupiterTestDescriptorResolver} for resolving uniform paths and | ||
* cluster ids. Therefore, the engine root is set accordingly. | ||
*/ | ||
private final UniqueId engine1RootId = UniqueId.forEngine("junit-jupiter"); | ||
|
||
/** FirstTestClass contains one non-impacted test. */ | ||
private final UniqueId firstTestClassId = engine1RootId.append( | ||
JUnitJupiterTestDescriptorResolver.CLASS_SEGMENT_TYPE, FIRST_TEST_CLASS); | ||
private final UniqueId nonImpactedTestCase1Id = firstTestClassId | ||
.append(JUnitJupiterTestDescriptorResolver.METHOD_SEGMENT_TYPE, NON_IMPACTED_TEST_CASE_1); | ||
private final TestDescriptor nonImpactedTestCase1 = testCase(nonImpactedTestCase1Id); | ||
private final TestDescriptor firstTestClass = testContainer(firstTestClassId, nonImpactedTestCase1); | ||
|
||
private final TestDescriptor testEngine1Root = testContainer(engine1RootId, firstTestClass); | ||
|
||
@Override | ||
public List<TestEngine> getEngines() { | ||
return singletonList(new DummyEngine(testEngine1Root)); | ||
} | ||
|
||
@Override | ||
public List<PrioritizableTestCluster> getImpactedTests() { | ||
return Collections.emptyList(); | ||
} | ||
|
||
@Override | ||
public void verifyCallbacks(EngineExecutionListener executionListener) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.