@@ -87,7 +87,7 @@ public interface IEventFilterApplier
87
87
/// <param name="expectedCount">The expected number of events</param>
88
88
/// <param name="action">The action.</param>
89
89
Task ExpectAsync ( int expectedCount , Action action ) ;
90
-
90
+
91
91
/// <summary>
92
92
/// Executes <paramref name="actionAsync"/> task and expects the specified number
93
93
/// of events to be logged during the execution.
@@ -99,6 +99,18 @@ public interface IEventFilterApplier
99
99
/// <param name="actionAsync">The async action.</param>
100
100
Task ExpectAsync ( int expectedCount , Func < Task > actionAsync ) ;
101
101
102
+ /// <summary>
103
+ /// Executes <paramref name="actionAsync"/> task and expects the specified number
104
+ /// of events to be logged during the execution.
105
+ /// This method fails and throws an exception if more events than expected are logged,
106
+ /// or if a timeout occurs. The timeout is taken from the config value
107
+ /// "akka.test.filter-leeway", see <see cref="TestKitSettings.TestEventFilterLeeway"/>.
108
+ /// </summary>
109
+ /// <param name="expectedCount">The expected number of events</param>
110
+ /// <param name="actionAsync">The async action.</param>
111
+ /// <param name="timeout"></param>
112
+ Task ExpectAsync ( int expectedCount , Func < Task > actionAsync , TimeSpan ? timeout ) ;
113
+
102
114
/// <summary>
103
115
/// Executes <paramref name="action"/> and expects the specified number
104
116
/// of events to be logged during the execution.
@@ -183,13 +195,14 @@ public interface IEventFilterApplier
183
195
/// <param name="func">The function.</param>
184
196
/// <returns>The returned value from <paramref name="func"/>.</returns>
185
197
T Expect < T > ( int expectedCount , Func < T > func ) ;
186
-
198
+
187
199
/// <summary>
188
200
/// Executes <paramref name="func"/> and expects the specified number
189
201
/// of events to be logged during the execution.
190
202
/// This function fails and throws an exception if more events than expected are logged,
191
203
/// or if a timeout occurs. The timeout is taken from the config value
192
204
/// "akka.test.filter-leeway", see <see cref="TestKitSettings.TestEventFilterLeeway"/>.
205
+ /// Note: <paramref name="func"/> might not get awaited.
193
206
/// </summary>
194
207
/// <typeparam name="T">The return value of the function</typeparam>
195
208
/// <param name="expectedCount">The expected number of events</param>
0 commit comments