Skip to content

Commit 5595a93

Browse files
committed
Some cleanup
1 parent 1ac438c commit 5595a93

File tree

1 file changed

+4
-8
lines changed
  • fdb-record-layer-core/src/test/java/com/apple/foundationdb/record/provider/foundationdb/keyspace

1 file changed

+4
-8
lines changed

fdb-record-layer-core/src/test/java/com/apple/foundationdb/record/provider/foundationdb/keyspace/KeySpacePathTest.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* Tests for {@link KeySpacePath}.
4444
* See also {@link KeySpacePathDataExportTest} and {@link ResolvedKeySpacePathTest}.
4545
*/
46-
public class KeySpacePathTest {
46+
class KeySpacePathTest {
4747

4848
@RegisterExtension
4949
final FDBDatabaseExtension dbExtension = new FDBDatabaseExtension();
@@ -161,15 +161,13 @@ void testToResolvedPathAsyncWithKeyNotSubPath() {
161161
try (FDBRecordContext context = database.openContext()) {
162162
KeySpacePath rootPath = keySpace.path("test_root");
163163
KeySpacePath branchPath = rootPath.add("branch");
164-
KeySpacePath leafPath = branchPath.add("leaf", "leaf_value");
165164

166165
// Create a key that is shorter than branchPath - it stops at root
167166
byte[] shorterKeyBytes = rootPath.toSubspace(context).pack();
168167

169168
// Attempting to resolve a key that is not under branchPath should error
170-
ExecutionException ex = assertThrows(ExecutionException.class, () -> {
171-
branchPath.toResolvedPathAsync(context, shorterKeyBytes).get();
172-
});
169+
ExecutionException ex = assertThrows(ExecutionException.class,
170+
() -> branchPath.toResolvedPathAsync(context, shorterKeyBytes).get());
173171
assertEquals(RecordCoreArgumentException.class, ex.getCause().getClass());
174172
}
175173
}
@@ -188,9 +186,7 @@ void testToResolvedPathAsyncWithInvalidTuple() {
188186

189187
// Attempting to resolve invalid tuple bytes should error
190188
// The exception is thrown synchronously from Tuple.fromBytes, not wrapped in ExecutionException
191-
assertThrows(IllegalArgumentException.class, () -> {
192-
branchPath.toResolvedPathAsync(context, invalidBytes);
193-
});
189+
assertThrows(IllegalArgumentException.class, () -> branchPath.toResolvedPathAsync(context, invalidBytes));
194190
}
195191
}
196192

0 commit comments

Comments
 (0)