Skip to content

Make retry/polling intervals overridable vars to speed up tests - #360

Merged
gab-arrobo merged 2 commits into
omec-project:mainfrom
gab-arrobo:config-intervals
Oct 15, 2026
Merged

gab-arrobo merged 2 commits into
omec-project:mainfrom
gab-arrobo:config-intervals

Conversation

@gab-arrobo

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
@gab-arrobo
gab-arrobo requested review from a team and a balanced review from Copilot October 15, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The polling retry test’s shortened fixed wait can cause failures on busy runners.

1 open finding
What changed in this PR

Makes polling and registration timing configurable in tests while preserving production defaults.

Changes:

  • Converts retry and polling durations from constants to variables.
  • Uses 20ms intervals in selected tests and restores the original values afterward.
File Description
polling/​nf_configuration.go Makes polling durations overridable.
polling/​nf_configuration_test.go Shortens polling intervals in tests.
nfregistration/​nf_registration.go Makes registration retry timing overridable.
nfregistration/​nf_registration_test.go Shortens and restores the retry interval.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread polling/nf_configuration_test.go
Copilot AI balanced review requested due to automatic review settings October 15, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The polling retry test’s timeout bypasses worker shutdown, leaving a goroutine running while shared globals are restored.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread polling/nf_configuration_test.go
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Production defaults remain unchanged, and no blocking issues were identified in the timing overrides or test cleanup.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@andybavier andybavier left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

+1

@gab-arrobo
gab-arrobo merged commit c0c2b18 into omec-project:main Oct 15, 2026
12 checks passed
@gab-arrobo
gab-arrobo deleted the config-intervals branch October 15, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants