Polishing tests for delete session

This commit is contained in:
Greg Turnquist
2019-01-15 16:51:09 -06:00
parent 8db8978549
commit b04a0305e9
2 changed files with 13 additions and 2 deletions

View File

@@ -141,7 +141,7 @@ public class ReactiveMongoOperationsSessionRepository
return findSession(id)
.flatMap(document -> this.mongoOperations.remove(document, this.collectionName).then(Mono.just(document)))
.map(document -> convertToSession(this.mongoSessionConverter, document))
.map(mongoSession -> Mono.fromRunnable(() -> publishEvent(new SessionDeletedEvent(this, mongoSession))))
.doOnSuccess(mongoSession -> publishEvent(new SessionDeletedEvent(this, mongoSession)))
.then();
}