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

Forward compatibility for refresh update sites button change #1080

Merged
merged 9 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ branches['CI'] = {
for (int i = 0; i < splits.size(); i++) {
int index = i
for (int j in [11]) {
for (String v in ['lts', 'latest']) {
for (String v in ['latest']) {
int javaVersion = j
String jenkinsUnderTest = v
def name = "java-${javaVersion}-jenkins-${jenkinsUnderTest}-split${index}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void checkForUpdates() {
// The check now button is a form submit (POST) with a redirect to the same page only if the check is successful.
// We use the button itself to detect when the page has changed, which happens after the refresh has been done
// And we check for the presence of the button again
WebElement checkButton = find(by.link("Check now"));
WebElement checkButton = find(by.css("form[action='checkUpdatesServer'] .jenkins-button"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to use the id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button prior to this PR didn't have an ID

checkButton.click();
// The wait criteria is: we have left the current page and returned to the same one
waitFor(checkButton).withTimeout(java.time.Duration.of(time.seconds(30), ChronoUnit.MILLIS)).until(webElement -> {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ath-container/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [ ! -f $war ]; then
case "$war" in
"latest")
war=jenkins-latest.war
url=https://updates.jenkins.io/latest/jenkins.war
url=https://ci.jenkins.io/job/Core/job/jenkins/job/PR-7770/lastSuccessfulBuild/artifact/org/jenkins-ci/main/jenkins-war/2.397-rc33478.7b_b_c2da_04a_74/jenkins-war-2.397-rc33478.7b_b_c2da_04a_74.war
;;
"lts")
war=jenkins-lts.war
Expand Down