You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
oteltest: make CheckReceivers environment more similar to the collector (#43302)
* oteltest: make CheckReceivers environment more similar to the collector
The CheckReceivers function is designed to start receivers in the same
process to assert conditions. This simulated environment should closely
resemble the real OTel collector startup.
This PR fixes some inconsistencies in the test environment.
First, when instantiating receivers, the collector first creates them using
the factory and only then starts each component. Previously, we were
creating and starting each receiver sequentially, which is incorrect and
masked issues with global state when multiple receivers were present.
Second, a Beats receiver logger inherits from the zap.Core of the
collector logger. This core includes certain fields—specifically
data_type, kind, and name. In the tests, these fields were previously
missing, so this PR ensures they are included.
* remove i++
* use EventuallyWithT for assertions
* fix imports
* specify factory per receiver
(cherry picked from commit 8d31036)
0 commit comments