Skip to content

Commit

Permalink
Merge pull request #1643 from jenkinsci/ath
Browse files Browse the repository at this point in the history
Bump ATH and Jenkins versions
  • Loading branch information
uhafner committed Dec 22, 2023
2 parents fc5f3d6 + 7e585b2 commit 0cb54a2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void shouldGetIoErrorBySearchingForAffectedFiles() {

String consoleLog = getConsoleLog(result);
assertThat(consoleLog).contains("0 copied");
if (isWindows()) { // In Windows a file does not exist if it is unreadable
if (isWindows() && Runtime.version().feature() < 21) { // In Windows a file does not exist if it is unreadable
assertThat(consoleLog).contains("4 not-found", "0 with I/O error");
}
else {
Expand Down Expand Up @@ -267,7 +267,7 @@ private void buildAndVerifyFilesResolving(final FreeStyleProject job, final Colu
}

private IssuesRow getIssuesModel(final AnalysisResult result, final int rowNumber) {
IssuesDetail issuesDetail = (IssuesDetail) result.getOwner().getAction(ResultAction.class).getTarget();
IssuesDetail issuesDetail = result.getOwner().getAction(ResultAction.class).getTarget();
return (IssuesRow) issuesDetail.getTableModel("issues").getRows().get(rowNumber);
}

Check warning on line 272 in plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/AffectedFilesResolverITest.java

View check run for this annotation

ci.jenkins.io / CPD

CPD

LOW: Found duplicated code.
Raw output
<pre><code>} private IssuesRow getIssuesModel(final AnalysisResult result, final int rowNumber) { IssuesDetail issuesDetail &#61; result.getOwner().getAction(ResultAction.class).getTarget(); return (IssuesRow) issuesDetail.getTableModel(&#34;issues&#34;).getRows().get(rowNumber); }</code></pre>

Expand Down
12 changes: 9 additions & 3 deletions ui-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<name>UI Tests of Warnings Plugin</name>

<properties>
<jenkins.version>2.417</jenkins.version>
<jenkins.version>2.437</jenkins.version>
<hpi-plugin.version>3.51</hpi-plugin.version>
<json-smart.version>2.3</json-smart.version>
<json-unit-assertj.version>2.38.0</json-unit-assertj.version>
Expand All @@ -38,7 +38,7 @@
<!-- ClassNotFoundException if omitted -->
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.101.Final</version>
<version>4.1.104.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -49,7 +49,13 @@
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>acceptance-test-harness</artifactId>
<version>5504.v485694f31cdf</version>
<version>5770.v81b_784f28b_d7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.16.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.Select;

import com.gargoylesoftware.htmlunit.ScriptResult;
import com.google.inject.Injector;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
Expand Down Expand Up @@ -322,9 +321,8 @@ public String getTrendChartById(final String elementId) {
"delete(window.Array.prototype.toJSON) %n"
+ "return JSON.stringify(echarts.getInstanceByDom(document.getElementById(\"%s\")).getOption())",
elementId));
Object scriptResult = new ScriptResult(result).getJavaScriptResult();
if (scriptResult != null) {
return scriptResult.toString();
if (result != null) {
return result.toString();
}
elasticSleep(1000);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.jenkins.plugins.analysis.warnings;

import java.time.Duration;
import java.util.Collection;
import java.util.List;

Expand Down Expand Up @@ -303,7 +304,6 @@ public void shouldMemorizeSelectedNumberOfRowsOnReload() {
issuesPaginateButtons = issuesPaginate.findElements(By.cssSelector("ul li"));

assertThat(issuesPaginateButtons.size()).isEqualTo(1);

}

/**
Expand All @@ -316,7 +316,7 @@ public void shouldMemorizeSelectedNumberOfRowsOnReload() {
* WebElement that should contain the expected string
*/
private void waitUntilCondition(final WebElement target, final String expectedString) {
WebDriverWait wait = new WebDriverWait(driver, 2, 100);
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(2), Duration.ofMillis(100));
wait.until(ExpectedConditions.textToBePresentInElement(target, expectedString));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ protected void verifyCpd(final Build build) {
"-> found 20 issues (skipped 0 duplicates)",
"-> 1 copied, 0 not in workspace, 0 not-found, 0 with I/O error",
"Issues delta (vs. reference build): outstanding: 0, new: 20, fixed: 0");

}

protected void verifyFindBugs(final Build build) {
Expand All @@ -202,7 +201,7 @@ protected void verifyFindBugs(final Build build) {
.hasFixedSize(0)
.hasReferenceBuild(1)
.hasInfoType(InfoType.INFO)
.hasDetails("No issues for 2 builds, i.e. since build: #1");
.hasDetails("No issues for 2 builds, i.e. since build: Success #1");

assertThat(openInfoView(build, FINDBUGS_ID))
.hasNoErrorMessages()
Expand Down

0 comments on commit 0cb54a2

Please sign in to comment.