Skip to content

Commit af91a06

Browse files
committed
updated test
1 parent 9b37ba3 commit af91a06

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

client/src/test/java/com/microsoft/durabletask/TypedEntityMetadataTest.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ void jacksonSerialization_typedEntityMetadata_hidesInternalFields() throws Excep
150150

151151
@Test
152152
void jacksonSerialization_entityMetadata_hidesInternalFields() throws Exception {
153+
Instant now = Instant.parse("2026-01-15T10:30:00Z");
153154
EntityMetadata base = new EntityMetadata(
154-
"@counter@c1", Instant.EPOCH, 0, null, "99", true, dataConverter);
155+
"@counter@c1", now, 3, "orch-lock-456", "99", true, dataConverter);
155156

156157
ObjectMapper mapper = new ObjectMapper();
157158
mapper.findAndRegisterModules();
@@ -161,11 +162,20 @@ void jacksonSerialization_entityMetadata_hidesInternalFields() throws Exception
161162
// Should include public API fields
162163
assertTrue(root.has("entityId"), "Should have entityId field");
163164
assertTrue(root.has("lastModifiedTime"), "Should have lastModifiedTime field");
165+
assertTrue(root.has("backlogQueueSize"), "Should have backlogQueueSize field");
166+
assertTrue(root.has("lockedBy"), "Should have lockedBy field");
167+
assertTrue(root.has("includesState"), "Should have includesState field");
164168

165169
// Should NOT include internal fields
166170
assertFalse(root.has("serializedState"), "Should not expose serializedState");
167171
assertFalse(root.has("dataConverter"), "Should not expose dataConverter");
168172
assertFalse(root.has("instanceId"), "Should not expose raw instanceId");
173+
174+
// Verify field values
175+
assertEquals("@counter@c1", root.get("entityId").asText());
176+
assertEquals(3, root.get("backlogQueueSize").asInt());
177+
assertEquals("orch-lock-456", root.get("lockedBy").asText());
178+
assertTrue(root.get("includesState").asBoolean());
169179
}
170180

171181
// endregion

0 commit comments

Comments
 (0)