Path: redb-route/tests/Shared/Conformance/BrokerFaultTheoryAttribute.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/tests/Shared/Conformance/BrokerFaultTheoryAttribute.cs
----
namespace redb.Route.Tests.Conformance;
///
/// A theory that breaks the broker's container (): skipped unless the variable it names holds
/// the container's name. The release gate does not set it; such tests run by hand on a stand, with
/// tests/docker/run-fault-suite.sh, before a release that touches the connector's connection handling.
///
internal sealed class BrokerFaultTheoryAttribute : TheoryAttribute
{
/// The variable that names the broker's container.
public BrokerFaultTheoryAttribute(string containerVariable)
{
ContainerVariable = containerVariable;
if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(containerVariable)))
Skip = $"{containerVariable} is not set: the test breaks the broker's container with docker. Not run by the " +
"release gate; run it by hand with tests/docker/run-fault-suite.sh before a release that touches the " +
"connector's connection handling.";
}
/// The variable that names the broker's container.
public string ContainerVariable { get; }
}