We have recently done 2 things in our code base:
- use
FireAsync instead of Fire
- moved from Stateless 5.16.0 to 5.20.1
Our unit tests suddenly started failing because the unmet conditions were not present in the StatelessTransitionException<,> exception anymore.
Rolling back to 5.17.0 works. Tests start failing in 5.18.0.
I haven't checked the code in details, but have noticed this in debug:
private async Task InternalFireOneAsync(TTrigger trigger, params object[] args)
{
if (_triggerConfiguration.TryGetValue(trigger, out TriggerWithParameters configuration))
{
configuration.ValidateParameters(args);
}
var source = State;
var representativeState = GetRepresentation(source);
var foundHandler = await representativeState.TryFindHandlerAsync(trigger, args);
if (foundHandler == null || foundHandler.UnmetGuardConditions.Any())
{
await _unhandledTriggerAction.ExecuteAsync(representativeState.UnderlyingState, trigger, null); // <|----
return;
}
In the code above, we're entering the last if condition with foundHandler not null but with 1 unmet guard. In the next line, null is passed for unmet guards. Could this be a bug ?
Thanks in advance for your answer
We have recently done 2 things in our code base:
FireAsyncinstead ofFireOur unit tests suddenly started failing because the unmet conditions were not present in the
StatelessTransitionException<,>exception anymore.Rolling back to 5.17.0 works. Tests start failing in 5.18.0.
I haven't checked the code in details, but have noticed this in debug:
In the code above, we're entering the last
ifcondition withfoundHandlernot null but with 1 unmet guard. In the next line,nullis passed for unmet guards. Could this be a bug ?Thanks in advance for your answer