Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message and fail behavior of ParallelBuildChainTest #657 #658

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Eclipse Core Tests Resources
Bundle-SymbolicName: org.eclipse.core.tests.resources; singleton:=true
Bundle-Version: 3.11.200.qualifier
Bundle-Version: 3.11.300.qualifier
Bundle-Vendor: Eclipse.org
Export-Package: org.eclipse.core.tests.filesystem,
org.eclipse.core.tests.internal.alias,
Expand Down
2 changes: 1 addition & 1 deletion resources/tests/org.eclipse.core.tests.resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<version>4.30.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.core.tests.resources</artifactId>
<version>3.11.200-SNAPSHOT</version>
<version>3.11.300-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ParallelBuildChainTest extends AbstractBuilderTest {

private static final int MAXIMUM_NUMBER_OF_CONCURRENT_BUILDS = 3;

private static final int TIMEOUT_IN_MILLIS = 60_000;
private static final int TIMEOUT_IN_MILLIS = 20_000;

private static enum BuildDurationType {
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public class TimerBuilder extends IncrementalProjectBuilder {
public static final String DURATION_ARG = "duration";
public static final String RULE_TYPE_ARG = "ruleType";

private static final int SHUTDOWN_TIMEOUT_IN_MILLIS = 60_000;

private static BuildExecutionState executionState = new BuildExecutionState(-1);

private static class BuildExecutionState {
Expand Down Expand Up @@ -72,11 +74,14 @@ private synchronized void endedExcecutingProject(IProject project) {

private synchronized void abortAndWaitForAllBuilds() {
shallAbort = true;
while (isExecuting()) {
long durationInMillis = 0;
long waitingStartTimeInMillis = System.currentTimeMillis();
while (isExecuting() && durationInMillis < SHUTDOWN_TIMEOUT_IN_MILLIS) {
try {
wait();
wait(SHUTDOWN_TIMEOUT_IN_MILLIS);
} catch (InterruptedException e) {
}
durationInMillis = System.currentTimeMillis() - waitingStartTimeInMillis;
}
}

Expand Down
Loading