Skip to content

Commit

Permalink
fix conflicts solving
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCAI-mlv committed Oct 14, 2024
1 parent a703c1e commit 753872c
Showing 1 changed file with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,15 +638,14 @@ void shouldNotDeleteSchemaVersionInDryRunMode() {
@Test
void shouldBulkDeleteAllSchemaVersions() {
Namespace namespace = buildNamespace();
Schema schema1 = buildSchema();
SchemaList schemaList = buildSchemaList();
Schema schema = buildSchemaNameOnly();

when(namespaceService.findByName("myNamespace"))
.thenReturn(Optional.of(namespace));
when(schemaService.findByWildcardName(namespace, "prefix.subject-value"))
.thenReturn(Flux.fromIterable(List.of(schemaList)));
.thenReturn(Flux.fromIterable(List.of(schema)));
when(schemaService.getSubjectLatestVersion(namespace, "prefix.subject-value"))
.thenReturn(Mono.just(schema1));
.thenReturn(Mono.just(schema));
when(schemaService.deleteAllVersions(namespace, "prefix.subject-value"))
.thenReturn(Mono.just(new Integer[1]));

Expand All @@ -660,13 +659,12 @@ void shouldBulkDeleteAllSchemaVersions() {
@Test
void shouldBulkDeleteSchemaVersion() {
Namespace namespace = buildNamespace();
Schema schema = buildSchema();
SchemaList schemaList = buildSchemaList();
Schema schema = buildSchemaNameOnly();

when(namespaceService.findByName("myNamespace"))
.thenReturn(Optional.of(namespace));
when(schemaService.findByWildcardName(namespace, "prefix.subject-value"))
.thenReturn(Flux.fromIterable(List.of(schemaList)));
.thenReturn(Flux.fromIterable(List.of(schema)));
when(schemaService.getSubjectByVersion(namespace, "prefix.subject-value", "1"))
.thenReturn(Mono.just(schema));
when(schemaService.deleteVersion(namespace, "prefix.subject-value", "1"))
Expand Down Expand Up @@ -715,14 +713,13 @@ void shouldNotBulkDeleteSchemaVersionWhenEmpty() {
@Test
void shouldNotBulkDeleteAllSchemaVersionsWhenVersionNotFound() {
Namespace namespace = buildNamespace();
Schema schema = buildSchema();
SchemaList schemaList = buildSchemaList();
SchemaList schemaList2 = buildSchemaList2();
Schema schema = buildSchemaNameOnly();
Schema schema2 = buildSchemaNameOnly2();

when(namespaceService.findByName("myNamespace"))
.thenReturn(Optional.of(namespace));
when(schemaService.findByWildcardName(namespace, "prefix.subject*"))
.thenReturn(Flux.fromIterable(List.of(schemaList, schemaList2)));
.thenReturn(Flux.fromIterable(List.of(schema, schema2)));
when(schemaService.getSubjectLatestVersion(namespace, "prefix.subject-value"))
.thenReturn(Mono.just(schema));
when(schemaService.getSubjectLatestVersion(namespace, "prefix.subject2-value"))
Expand All @@ -739,14 +736,13 @@ void shouldNotBulkDeleteAllSchemaVersionsWhenVersionNotFound() {
@Test
void shouldNotBulkDeleteSchemaVersionWhenVersionNotFound() {
Namespace namespace = buildNamespace();
Schema schema = buildSchema();
SchemaList schemaList = buildSchemaList();
SchemaList schemaList2 = buildSchemaList2();
Schema schema = buildSchemaNameOnly();
Schema schema2 = buildSchemaNameOnly2();

when(namespaceService.findByName("myNamespace"))
.thenReturn(Optional.of(namespace));
when(schemaService.findByWildcardName(namespace, "prefix.subject*"))
.thenReturn(Flux.fromIterable(List.of(schemaList, schemaList2)));
.thenReturn(Flux.fromIterable(List.of(schema, schema2)));
when(schemaService.getSubjectByVersion(namespace, "prefix.subject-value", "1"))
.thenReturn(Mono.just(schema));
when(schemaService.getSubjectByVersion(namespace, "prefix.subject2-value", "1"))
Expand All @@ -763,13 +759,12 @@ void shouldNotBulkDeleteSchemaVersionWhenVersionNotFound() {
@Test
void shouldNotBulkDeleteAllSchemaVersionsInDryRunMode() {
Namespace namespace = buildNamespace();
Schema schema = buildSchema();
SchemaList schemaList = buildSchemaList();
Schema schema = buildSchemaNameOnly();

when(namespaceService.findByName("myNamespace"))
.thenReturn(Optional.of(namespace));
when(schemaService.findByWildcardName(namespace, "prefix.subject-value"))
.thenReturn(Flux.fromIterable(List.of(schemaList)));
.thenReturn(Flux.fromIterable(List.of(schema)));
when(schemaService.getSubjectLatestVersion(namespace, "prefix.subject-value"))
.thenReturn(Mono.just(schema));

Expand All @@ -783,13 +778,12 @@ void shouldNotBulkDeleteAllSchemaVersionsInDryRunMode() {
@Test
void shouldNotBulkDeleteSchemaVersionInDryRunMode() {
Namespace namespace = buildNamespace();
Schema schema = buildSchema();
SchemaList schemaList = buildSchemaList();
Schema schema = buildSchemaNameOnly();

when(namespaceService.findByName("myNamespace"))
.thenReturn(Optional.of(namespace));
when(schemaService.findByWildcardName(namespace, "prefix.subject-value"))
.thenReturn(Flux.fromIterable(List.of(schemaList)));
.thenReturn(Flux.fromIterable(List.of(schema)));
when(schemaService.getSubjectByVersion(namespace, "prefix.subject-value", "1"))
.thenReturn(Mono.just(schema));

Expand Down

0 comments on commit 753872c

Please sign in to comment.