@Test void multipleRunShouldDaoMisMatchOnId() { mailboxDAO.save(MAILBOX).block(); mailboxPathV2DAO.save(MAILBOX_PATH, CASSANDRA_ID_2).block(); testee.fixMailboxInconsistencies(new Context()).block(); testee.fixMailboxInconsistencies(new Context()).block(); SoftAssertions.assertSoftly(softly -> { softly.assertThat(mailboxDAO.retrieveAllMailboxes().collectList().block()) .containsExactlyInAnyOrder(MAILBOX); softly.assertThat(mailboxPathV2DAO.listAll().collectList().block()) .containsExactlyInAnyOrder(new CassandraIdAndPath(CASSANDRA_ID_1, MAILBOX_PATH)); }); }
public Mono<Result> fixMailboxInconsistencies(Context context) { assertValidVersion(); return Flux.concat( processMailboxDaoInconsistencies(context), processMailboxPathDaoInconsistencies(context)) .reduce(Result.COMPLETED, Task::combine); }
SolveMailboxInconsistenciesService { public Mono<Result> fixMailboxInconsistencies(Context context) { assertValidVersion(); return Flux.concat( processMailboxDaoInconsistencies(context), processMailboxPathDaoInconsistencies(context)) .reduce(Result.COMPLETED, Task::combine); } }
SolveMailboxInconsistenciesService { public Mono<Result> fixMailboxInconsistencies(Context context) { assertValidVersion(); return Flux.concat( processMailboxDaoInconsistencies(context), processMailboxPathDaoInconsistencies(context)) .reduce(Result.COMPLETED, Task::combine); } @Inject  SolveMailboxInconsistenciesService(CassandraMailboxDAO mailboxDAO, CassandraMailboxPathV2DAO mailboxPathV2DAO, CassandraSchemaVersionManager versionManager); }
SolveMailboxInconsistenciesService { public Mono<Result> fixMailboxInconsistencies(Context context) { assertValidVersion(); return Flux.concat( processMailboxDaoInconsistencies(context), processMailboxPathDaoInconsistencies(context)) .reduce(Result.COMPLETED, Task::combine); } @Inject  SolveMailboxInconsistenciesService(CassandraMailboxDAO mailboxDAO, CassandraMailboxPathV2DAO mailboxPathV2DAO, CassandraSchemaVersionManager versionManager); Mono<Result> fixMailboxInconsistencies(Context context); }
SolveMailboxInconsistenciesService { public Mono<Result> fixMailboxInconsistencies(Context context) { assertValidVersion(); return Flux.concat( processMailboxDaoInconsistencies(context), processMailboxPathDaoInconsistencies(context)) .reduce(Result.COMPLETED, Task::combine); } @Inject  SolveMailboxInconsistenciesService(CassandraMailboxDAO mailboxDAO, CassandraMailboxPathV2DAO mailboxPathV2DAO, CassandraSchemaVersionManager versionManager); Mono<Result> fixMailboxInconsistencies(Context context); static final Logger LOGGER; }