Skip to content

Go SDK: worker_metadata integration test can pass on the wrong worker #1766

Description

@MarcusElwin

Problem

sdk/packages/go/iii/tests/worker_metadata_test.go asserts that a connected worker with runtime "go" appears in engine::workers::list. But it stops at the first connected go worker it finds — it doesn't correlate to the specific worker this test created.

In a shared integration environment (e.g. another Go worker connected, or a previous test's worker not yet reaped), the assertion can pass even if the client created by this test never registered its metadata. The test would give a false green.

Fix

Correlate the assertion to the worker opened by this test — e.g. register a uniquely-named function (per uniqueSuffix(t)) and match the worker entry that exposes it, or match on the worker's name/id rather than just runtime == "go".

Raised by CodeRabbit on #1740.

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions