Skip to content

Commit 75301c1

Browse files
committed
fix: service test breaking synchronously (band aid)
1 parent 3ebdc28 commit 75301c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Whaally.Domain.Testing/ServiceTest.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ public ServiceTest(
2727
};
2828

2929
// TODO: Reconsider this approach and refactor into an IAsyncLifetime structure
30-
Handler.Invoke(Context, Service).RunSynchronously();
30+
var task = Handler.Invoke(Context, Service);
3131

32+
if (task is {
33+
IsCompleted: false,
34+
IsCanceled: false,
35+
IsFaulted: false
36+
}) task.RunSynchronously();
37+
3238
Result = Context.Result;
3339
Commands = Context.Commands.SelectMany(q => q.Messages);
3440
}

0 commit comments

Comments
 (0)