Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/foundation-2021' into release-29.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Reed committed Dec 13, 2021
2 parents 2f09786 + f032026 commit 3d62cc9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2017 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
* Copyright (C) 2017-2021 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
Expand Down Expand Up @@ -222,7 +222,7 @@ public List<Specific> getSpecifics() {
}

public void setSpecifics(final List<Specific> specifics) {
if (specifics == m_specifics) return;
if (specifics != null && specifics.equals(m_specifics)) return;
m_specifics.clear();
if (specifics != null) m_specifics.addAll(specifics);
}
Expand All @@ -246,7 +246,7 @@ public List<IncludeRange> getIncludeRanges() {
}

public void setIncludeRanges(final List<IncludeRange> includeRanges) {
if (includeRanges == m_includeRanges) return;
if (includeRanges != null && includeRanges.equals(m_includeRanges)) return;
m_includeRanges.clear();
if (includeRanges != null) m_includeRanges.addAll(includeRanges);
}
Expand All @@ -270,7 +270,7 @@ public List<ExcludeRange> getExcludeRanges() {
}

public void setExcludeRanges(final List<ExcludeRange> excludeRanges) {
if (excludeRanges == m_excludeRanges) return;
if (excludeRanges != null && excludeRanges.equals(m_excludeRanges)) return;
m_excludeRanges.clear();
if (excludeRanges != null) m_excludeRanges.addAll(excludeRanges);
}
Expand All @@ -294,7 +294,7 @@ public List<IncludeUrl> getIncludeUrls() {
}

public void setIncludeUrls(final List<IncludeUrl> includeUrls) {
if (includeUrls == m_includeUrls) return;
if (includeUrls != null && includeUrls.equals(m_includeUrls)) return;
m_includeUrls.clear();
if (includeUrls != null) m_includeUrls.addAll(includeUrls);
}
Expand All @@ -318,7 +318,7 @@ public List<ExcludeUrl> getExcludeUrls() {
}

public void setExcludeUrls(final List<ExcludeUrl> excludeUrls) {
if (excludeUrls == m_excludeUrls) return;
if (excludeUrls != null && excludeUrls.equals(m_excludeUrls)) return;
m_excludeUrls.clear();
if (excludeUrls != null) m_excludeUrls.addAll(excludeUrls);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@

import com.google.common.collect.Lists;

@org.junit.experimental.categories.Category(org.opennms.smoketest.junit.FlakyTests.class)
public class AngularLoginRedirectIT extends OpenNMSSeleniumIT {

private static final int SLEEP_TIME = 2000;
Expand Down Expand Up @@ -144,10 +143,15 @@ public void verifyRedirectToLogin() throws IOException {

// Run action (again or an individual one), which should still pass
LOG.info("{}: Perform action again. Should redirect to login page.", eachCheck.url);
if (eachCheck.actionToPerformAfterLogout != null) {
eachCheck.actionToPerformAfterLogout.run();
} else {
eachCheck.actionToPerform.run();
try {
if (eachCheck.actionToPerformAfterLogout != null) {
eachCheck.actionToPerformAfterLogout.run();
} else {
eachCheck.actionToPerform.run();
}
} catch(Exception e) {
// Sometimes we get logged out directly so the actionToPerform might fail.
// This is fine as long as the logout itself happened which we test below.
}
sleep(SLEEP_TIME);

Expand Down

0 comments on commit 3d62cc9

Please sign in to comment.