Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/hostmetrics] Fix processscraper resource attribute test (#3…
…6526) #### Description Previously, this test was repeatedly testing the first process resource in the list. This would usually pass (on non-Mac machines), but is not testing what it is supposed to. When changing it to test every resource in the scrape, it came up with issues due to the fact that not all resource attributes can always be found for every process. This PR changes the test to look at all process resources in the scrape, and instead of asserting the presence of every resource attribute, it checks for one mandatory attribute (the process ID) and ensures that no unexpected resource attributes are added. This should reduce the flakiness of this test on other environments, while still asserting this on every process resource in the list. #### Link to tracking issue Fixes #36468 #### Documentation A comment was added to the assertion helper, and more detailed error messages are produced on failure.
- Loading branch information