@Test void upgradeToVersionShouldNotThrowWhenCurrentVersionIsUpToDate() throws InterruptedException { when(schemaVersionDAO.getCurrentSchemaVersion()).thenReturn(Mono.just(Optional.of(CURRENT_VERSION))); assertThat(testee.upgradeToVersion(OLDER_VERSION).run()) .isEqualTo(Task.Result.COMPLETED); }
public Task upgradeToVersion(SchemaVersion target) { checkTarget(target); return taskFactory.create(target); }
CassandraMigrationService { public Task upgradeToVersion(SchemaVersion target) { checkTarget(target); return taskFactory.create(target); } }
CassandraMigrationService { public Task upgradeToVersion(SchemaVersion target) { checkTarget(target); return taskFactory.create(target); } @Inject  CassandraMigrationService(CassandraSchemaVersionDAO schemaVersionDAO, CassandraSchemaTransitions transitions,
                                     MigrationTask.Factory factory, @Named(LATEST_VERSION) SchemaVersion latestVersion); }
CassandraMigrationService { public Task upgradeToVersion(SchemaVersion target) { checkTarget(target); return taskFactory.create(target); } @Inject  CassandraMigrationService(CassandraSchemaVersionDAO schemaVersionDAO, CassandraSchemaTransitions transitions,
                                     MigrationTask.Factory factory, @Named(LATEST_VERSION) SchemaVersion latestVersion); Optional<SchemaVersion> getCurrentVersion(); Optional<SchemaVersion> getLatestVersion(); Task upgradeToVersion(SchemaVersion target); Task upgradeToLastVersion(); }
CassandraMigrationService { public Task upgradeToVersion(SchemaVersion target) { checkTarget(target); return taskFactory.create(target); } @Inject  CassandraMigrationService(CassandraSchemaVersionDAO schemaVersionDAO, CassandraSchemaTransitions transitions,
                                     MigrationTask.Factory factory, @Named(LATEST_VERSION) SchemaVersion latestVersion); Optional<SchemaVersion> getCurrentVersion(); Optional<SchemaVersion> getLatestVersion(); Task upgradeToVersion(SchemaVersion target); Task upgradeToLastVersion(); static final String LATEST_VERSION; }