diff --git a/receiver/mongodbreceiver/generated_component_test.go b/receiver/mongodbreceiver/generated_component_test.go index 19d7793a265c..2ab097eb039c 100644 --- a/receiver/mongodbreceiver/generated_component_test.go +++ b/receiver/mongodbreceiver/generated_component_test.go @@ -53,5 +53,17 @@ func TestComponentLifecycle(t *testing.T) { err = c.Shutdown(context.Background()) require.NoError(t, err) }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) } } diff --git a/receiver/mongodbreceiver/metadata.yaml b/receiver/mongodbreceiver/metadata.yaml index d70fc2d43f2b..689c93353cce 100644 --- a/receiver/mongodbreceiver/metadata.yaml +++ b/receiver/mongodbreceiver/metadata.yaml @@ -352,6 +352,6 @@ metrics: aggregation_temporality: cumulative attributes: [ ] -# TODO: Update the receiver to pass the tests tests: - skip_lifecycle: true + config: + timeout: 1ms