Restore and send gaps for Windows events
Description of the issue
Similar to https://github.com/aws/amazon-cloudwatch-agent/pull/1721 but instead for Windows. With multi-threaded support, it is possible that certain events were not sent: gaps in event delivery. We want to send those events on agent startup.
We also did not have any mocking for the sys calls to the Windows event API. This results in events being written to Windows directly since the actual sys calls were used for the tests.
Description of changes
How does this change address the problem?
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Describe what tests you have done.
Requirements
Before commiting your code, please do the following steps.
- Run
make fmtandmake fmt-sh - Run
make lint
Integration Tests
To run integration tests against this PR, add the ready for testing label.