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

Fix the timeout config option definition #16017

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

FlorentClarret
Copy link
Member

@FlorentClarret FlorentClarret commented Oct 16, 2023

What does this PR do?

Fix the timeout config option definition

Motivation

  • According to the doc mentioned in the code here, this option is supposed to be a integer and in millisonds
  • Spotted working on this PR where I got this error:
FAILED tests/test_check.py::test_sid - Exception: 
Traceback (most recent call last):
  File "D:\a\integrations-core\integrations-core\datadog_checks_base\datadog_checks\base\checks\base.py", line 1235, in run
    self.check(instance)
  File "D:\a\integrations-core\integrations-core\win32_event_log\datadog_checks\win32_event_log\check.py", line 135, in check
    for event in self.consume_events():
  File "D:\a\integrations-core\integrations-core\win32_event_log\datadog_checks\win32_event_log\check.py", line 272, in consume_events
    for event in self.poll_events():
  File "D:\a\integrations-core\integrations-core\win32_event_log\datadog_checks\win32_event_log\check.py", line 318, in poll_events
    wait_signal = win32event.WaitForSingleObjectEx(self._event_handle, self.config.timeout, True)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer

Additional Notes

Relates to https://datadoghq.atlassian.net/browse/AITS-277

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Changelog entries must be created for modifications to shipped code
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.

@github-actions
Copy link

Test Results

  2 files    2 suites   54s ⏱️
51 tests 51 ✔️ 0 💤 0
71 runs  71 ✔️ 0 💤 0

Results for commit dc7599f.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #16017 (dc7599f) into master (5ba30fc) will increase coverage by 0.12%.
Report is 3 commits behind head on master.
The diff coverage is n/a.

Flag Coverage Δ
activemq ?
cassandra ?
confluent_platform ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
presto ?
solr ?
tomcat ?
weblogic ?
win32_event_log 86.98% <ø> (+0.66%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@FlorentClarret FlorentClarret merged commit 67f3e94 into master Oct 16, 2023
@FlorentClarret FlorentClarret deleted the florentclarret/win32_envent_log/fix_timeout branch October 16, 2023 13:58
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.

4 participants