Test Generator: CollectionName is ignored by Sync outbox templates, so sync tests are never serialised #4239
Description
Summary
OutboxConfiguration.CollectionName is intended to render an xUnit [Collection(...)] attribute so tests sharing infrastructure do not run concurrently. It is honoured by the Async outbox templates but not by any of the Sync ones, so the generated sync outbox tests carry no [Collection] and can run in parallel against the same store.
Evidence
From tools/Paramore.Brighter.Test.Generator/Templates:
$ grep -rl "CollectionName" Templates/Outbox/Async/ | wc -l
12
$ grep -rl "CollectionName" Templates/Outbox/Sync/ | wc -l
0
The messaging gateway templates (Reactor/ and Proactor/) both honour it, so the outbox Sync set is the odd one out.
Configs that set CollectionName on an outbox and are silently getting no serialisation on their sync tests include tests/Paramore.Brighter.MySQL.Tests/test-configuration.json (MySQLTextOutbox, MySQLBinaryOutbox) and the MSSQL/PostgreSQL equivalents.
Impact
A likely source of CI flakiness: two sync outbox test classes over the same store can interleave. It would also be masked today wherever the outbox is configured with the singular Outbox form, since no sync tests are generated at all (see the sibling issue on that).
Expected
The Sync outbox templates should emit [Collection(...)] the same way the Async ones do:
{% if CollectionName != null %}[Collection("{{CollectionName}}")]{% endif %}Suggested fix
Add the conditional to the 12 templates in Templates/Outbox/Sync/, then regenerate all projects with ./generate-test.sh.
Notes
Found while documenting the generator for docs/factories/tests, where the gap is currently noted as a known defect.
Activity
docs: add test generator guides for boxes and transports