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

Bump Jenkins baseline from 2.249.x to 2.289.x #180

Merged
merged 1 commit into from
Sep 4, 2022
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
17 changes: 3 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ THE SOFTWARE.
<properties>
<revision>2.9</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.249.1</jenkins.version>
<jenkins.version>2.289.3</jenkins.version>
<gitHubRepo>jenkinsci/throttle-concurrent-builds-plugin</gitHubRepo>
</properties>

Expand Down Expand Up @@ -107,29 +107,18 @@ THE SOFTWARE.
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.249.x</artifactId>
<version>984.vb5eaac999a7e</version>
<artifactId>bom-2.289.x</artifactId>
<version>1500.ve4d05cd32975</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.18</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
import hudson.security.ACL;
import hudson.security.AuthorizationStrategy;
import hudson.util.CopyOnWriteMap;
import hudson.util.VersionNumber;

import jenkins.model.Jenkins;

import org.junit.Rule;
import org.junit.Test;
Expand Down Expand Up @@ -460,18 +457,7 @@ public void clearConfiguredCategories() throws Exception {
HtmlPage page = webClient.goTo("configure");
WebClientUtil.waitForJSExec(page.getWebClient());
HtmlForm config = page.getFormByName("config");
List<HtmlButton> deleteButtons;
// TODO Delete the tables code once the baseline is past 2.264.
VersionNumber version = Jenkins.getVersion();
if (version.isNewerThanOrEqualTo(new VersionNumber("2.264"))) {
deleteButtons = config.getByXPath(
"//div[text()='Multi-Project Throttle Categories']/../div//button[@title='Delete']");
} else {
deleteButtons =
config.getByXPath(
"//td[@class='setting-name' and text()='Multi-Project Throttle"
+ " Categories']/../td[@class='setting-main']//button[text()='Delete']");
}
List<HtmlButton> deleteButtons = config.getByXPath("//div[text()='Multi-Project Throttle Categories']/../div//button[@title='Delete']");
assertEquals(1, deleteButtons.size());
deleteButtons.get(0).click();
WebClientUtil.waitForJSExec(page.getWebClient());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import jenkins.model.Jenkins;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
Expand All @@ -61,9 +60,7 @@ public class ThrottleQueueTaskDispatcherTest {
private static final String maxTrace = "=> maxConcurrentPerNode' = ";
private static final String mismatch = "mismatch";
private static final String mismatchTrace = "node labels mismatch";
private static String parentXPath;
private static final String parentXPathTables = "//td[contains(text(),'Throttl')]/..";
private static final String parentXPathDivs = "//div[contains(text(),'Throttl')]/..";
private static final String parentXPath = "//div[contains(text(),'Throttl')]/..";
private static final String saveButtonText = "Save";
private static final String testCategoryName = "cat1";
private static final String testCategoryLabel = testCategoryName+"label";
Expand All @@ -82,17 +79,6 @@ public class ThrottleQueueTaskDispatcherTest {
@Rule
public JenkinsRule r = new JenkinsRule();

@Before
public void setUp() {
// TODO Delete the tables code once the baseline is past 2.264.
VersionNumber version = Jenkins.getVersion();
if (version.isNewerThanOrEqualTo(new VersionNumber("2.264"))) {
parentXPath = parentXPathDivs;
} else {
parentXPath = parentXPathTables;
}
}

/**
* @throws ExecutionException upon Jenkins project build scheduling issue.
* @throws InterruptedException upon Jenkins global configuration issue.
Expand Down