Skip to content

Commit 391c317

Browse files
committed
Improve the documentation of ConfigureFailPointCommandListener
The new wording provides guarantees that allow assertions in event matchers.
1 parent 7891545 commit 391c317

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

driver-sync/src/test/functional/com/mongodb/internal/event/ConfigureFailPointCommandListener.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ public final class ConfigureFailPointCommandListener implements CommandListener,
4646
* @param configureFailPoint See {@link FailPoint#enable(BsonDocument, ServerAddress)}.
4747
* @param serverAddress See {@link FailPoint#enable(BsonDocument, ServerAddress)}.
4848
* @param eventMatcher When an event is matched, an attempt to configure the fail point
49-
* specified via {@code configureFailPoint} is made. The attempt is made at most once regardless of how many events are matched.
49+
* specified via {@code configureFailPoint} is made.
50+
* The {@code eventMatcher} is guaranteed to be {@linkplain Predicate#test(Object) used} sequentially.
51+
* The attempt is made at most once,
52+
* and the {@code eventMatcher} {@linkplain Predicate#test(Object) test} that caused the attempt is the last one.
5053
*/
5154
public ConfigureFailPointCommandListener(
5255
final BsonDocument configureFailPoint,

0 commit comments

Comments
 (0)