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

Issue #169: Update unit test to disable custom metrics. #171

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

josepico01
Copy link
Contributor

  • Since all metrics are enabled by default and data provider was supplied with builtin metrics only, we need to disable those custom metrics before the schedule task is executed.

- Since all metrics are enabled by default and data provider was supplied with builtin metrics only, we need to disable those custom metrics before the schedule task is executed.
@cameron1729
Copy link
Contributor

Thanks @josepico01

With this patch, what would happen if a new "built in" metric was added and the execute_provider remained unchanged? I think we'd have the same problem right?

I think a better approach may be to disable all metrics at the beginning of test_execute - and this may have been the original intention because there's a line in the loop that explicitly enables the metric. By doing it this way, all metrics are gauranteed to be disabled, except the ones provided by execute_provider.

What do you think?

…end in the expected data provider.

- Replace qualifiers with imports
- Remove set_enabled(true) since it is not relevant anymore.
- Remove return tag
@cameron1729 cameron1729 merged commit 887aa60 into catalyst:MOODLE_35_STABLE Apr 23, 2024
21 checks passed
@josepico01 josepico01 deleted the Issue#169 branch April 23, 2024 01:01
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.

None yet

2 participants