Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miles-Garnsey committed Aug 24, 2023
1 parent 660c40f commit 17d298f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ public int hashCode() {
+ Objects.hashCode(repairParallelism)
+ Objects.hashCode(repairThreadCount);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,11 @@ public void testRepair() throws Exception {
eq("test_ks"),
eq(null),
eq(true),
eq(false));
eq(false),
eq(Optional.empty()),
eq(Optional.empty()),
eq(Optional.empty()),
eq(Optional.empty()));
}

@Test
Expand Down Expand Up @@ -1688,9 +1692,9 @@ public void testRepairAsync() throws Exception {
any(),
eq("CALL NodeOps.repair(?, ?, ?, ?, ?, ?, ?, ?)"),
eq("test_ks"),
eq(Optional.empty()),
eq(Optional.empty()),
eq(Optional.empty()),
eq(null),
eq(true),
eq(true),
eq(Optional.empty()),
eq(Optional.empty()),
eq(Optional.empty()),
Expand Down Expand Up @@ -2116,4 +2120,4 @@ MockHttpResponse invoke(HttpRequest request) {
return response;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.datastax.oss.driver.api.core.cql.Row;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import javax.ws.rs.core.Response;
Expand All @@ -43,13 +44,10 @@ public void testRepairResourcesSuccess() throws Exception {
any(), anyString(), any(), any(), any(), any(), any(), any(), any(), any()))
.thenReturn(mockResultSet);
RepairResources unit = new RepairResources(app);
List<String> tables = new ArrayList<>();
tables.add("table1");
tables.add("table2");
RepairRequest req =
new RepairRequest(
"keyspace",
tables,
Collections.singletonList("table1"),
false,
true,
new ArrayList<RingRange>(),
Expand Down Expand Up @@ -102,4 +100,4 @@ public void testRepairResourcesFail() throws Exception {
Response resp = unit.repair(req);
Assert.assertEquals(500, resp.getStatus());
}
}
}

0 comments on commit 17d298f

Please sign in to comment.