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

[TEST]: Improvement: Server42: Isl Rtt #5761

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

yuliiamir
Copy link
Collaborator

No description provided.

islUtils.waitForIslStatus([newIsl, newIsl.reversed], MOVED)
northbound.deleteLink(islUtils.toLinkParameters(newIsl))
wait(WAIT_OFFSET) { assert !islUtils.getIslInfo(newIsl).isPresent() }
if(islUtils.getIslInfo(newIsl).isPresent()) {
Copy link
Collaborator Author

@yuliiamir yuliiamir Jan 8, 2025

Choose a reason for hiding this comment

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

In the majority of the tests we have restoring replug in the scope of the test and there is no need to execute the following calls if there is no such link (already recovered).

@@ -151,6 +151,11 @@ isls:
dst_switch: ofsw8
dst_port: 7

- src_switch: ofsw7
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added this isl to be able to execute ISL RTT stats are not available for a moved link and available for a new link on virtual env (low priority )

def checkpointTime = new Date().getTime()
wait(islSyncWaitSeconds + WAIT_OFFSET, 2) {
assert islStats.of(isl).get(ISL_RTT, SERVER_42).hasNonZeroValuesAfter(checkpointTime)
assert islStats.of(isl.reversed).get(ISL_RTT, SERVER_42).hasNonZeroValuesAfter(checkpointTime)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Replaced checkIslRttStats with direct stats check:
to clarify stats are available used wait(),
to clarify there is no stats used timedLoop().

return changeIslRttSwitch(sw, islRttEnabled ? RttState.ENABLED.toString() : RttState.DISABLED.toString())
}

def changeIslRttSwitch(Switch sw, String requiredState) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved to switchHelper and replaced switchHelper.updateSwitchProperties with direct NB call to update props.

switchHelper.updateSwitchProperties includes default rules/meters verification (covered in DefaultRules: Able to delete/install the server42 ISL RTT turning rule on a switch)

}

def changeIslRttToggle(boolean requiredState) {
def originalState = featureToggles.getFeatureToggles().server42IslRtt
Copy link
Collaborator Author

@yuliiamir yuliiamir Jan 8, 2025

Choose a reason for hiding this comment

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

replaced with
featureToggles.getFeatureToggles().server42IslRtt == requiredState ?: featureToggles.server42IslRtt(requiredState)

@yuliiamir yuliiamir force-pushed the test/improvement-s42-isl branch from 335080b to d477f31 Compare January 16, 2025 16:38
@IvanChupin IvanChupin merged commit f16cf57 into develop Jan 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants