Repository navigation
Description
Summary
RemoteSchemaTest.getOrCreateVertexTypeWithPageSizeThrowsUnsupported never calls getOrCreateVertexType. It exercises buildVertexType(), which throws on the first call in the chain, so every builder call after it is dead code and the method the test is named for is never reached.
// network/src/test/java/com/arcadedb/remote/RemoteSchemaTest.java:149
@Test
void getOrCreateVertexTypeWithPageSizeThrowsUnsupported() {
assertThatThrownBy(() ->
schema.buildVertexType().withName("Type").withTotalBuckets(1).withIgnoreIfExists(true).withPageSize(100).create())
.isInstanceOf(UnsupportedOperationException.class);
}buildVertexType() throws immediately (RemoteSchema.java:431), so .withName(...), .withTotalBuckets(1), .withIgnoreIfExists(true), .withPageSize(100) and .create() never execute.
Consequence: a real coverage hole
The 3-argument overload the test is named for has no test:
// network/src/main/java/com/arcadedb/remote/RemoteSchema.java:494
@Deprecated
@Override
public VertexType getOrCreateVertexType(String typeName, int buckets, int pageSize) {
throw new UnsupportedOperationException();
}$ grep -n "getOrCreateVertexType" network/src/test/java/com/arcadedb/remote/RemoteSchemaTest.java
150: void getOrCreateVertexTypeWithPageSizeThrowsUnsupported() { <- does not call it
576: void getOrCreateVertexTypeReturnsExistingTypeWhenServerAnswersNoRows() {
582: final VertexType type = schema.getOrCreateVertexType("Person");
602: void getOrCreateVertexTypeStillThrowsWhenTypeIsMissingAfterTheCommand() {
610: assertThatThrownBy(() -> schema.getOrCreateVertexType("Person")).isInstanceOf(SchemaException.class);
614: void getOrCreateVertexTypeReportsTheKindMismatchInsteadOfCastingBlindly() {
622: assertThatThrownBy(() -> schema.getOrCreateVertexType("Person"))
Lines 576-622 all cover the 1-argument getOrCreateVertexType(String), which is a different, implemented overload. Nothing covers the 3-argument one.
The document-type counterpart is written correctly and shows the intended shape:
// RemoteSchemaTest.java:117
@Test
void getOrCreateDocumentTypeWithPageSizeThrowsUnsupported() {
assertThatThrownBy(() -> schema.getOrCreateDocumentType("Type", 1, 100))
.isInstanceOf(UnsupportedOperationException.class);
}Fix
Point the test at the method it is named for:
assertThatThrownBy(() -> schema.getOrCreateVertexType("Type", 1, 100))
.isInstanceOf(UnsupportedOperationException.class);The test passes both before and after, so this is a coverage correction rather than a bug fix. It is worth doing because the current test's green is not evidence about getOrCreateVertexType at all.
Context
Found during review of #7656 (which closes #7335). Not fixed there because that PR's workflow forbids modifying existing tests, and the mislabeling is unrelated to #7335's scope. #7656 does not change this test's outcome: buildVertexType() still throws UnsupportedOperationException, only now with a message.
Related: #7654 (the remaining bare UnsupportedOperationException throws in the remote client package, whose verification section has the same "assert the message, not just the type" theme).
Activity
Fix async durability signal, schema lock, batch replay and remote mes…
Merge pull request #7850 from ArcadeData/fix/issues-7673-7672-7667-76…
lvca commentedon Sep 18, 2026
Fixed in #7850 (26.10.1).
A test-only correction: the test named for the 3-argument
getOrCreateVertexTypenever called it, so that method had no coverage. It does now. No behaviour change.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.