diff --git a/temporal-sdk/src/test/java/io/temporal/workflow/searchattributes/TypedSearchAttributesTest.java b/temporal-sdk/src/test/java/io/temporal/workflow/searchattributes/TypedSearchAttributesTest.java index 16c14faa7..8677bd91b 100644 --- a/temporal-sdk/src/test/java/io/temporal/workflow/searchattributes/TypedSearchAttributesTest.java +++ b/temporal-sdk/src/test/java/io/temporal/workflow/searchattributes/TypedSearchAttributesTest.java @@ -67,6 +67,7 @@ public class TypedSearchAttributesTest { .set(SearchAttributeKey.forDouble("CustomDoubleField"), 1.23) .set(SearchAttributeKey.forBoolean("CustomBoolField"), true) .set(SearchAttributeKey.forOffsetDateTime("CustomDatetimeField"), OffsetDateTime.now()) + .set(SearchAttributeKey.forKeywordList("TemporalChangeVersion"), Arrays.asList("version")) .build(); @Rule diff --git a/temporal-test-server/src/main/java/io/temporal/internal/testservice/TestVisibilityStoreImpl.java b/temporal-test-server/src/main/java/io/temporal/internal/testservice/TestVisibilityStoreImpl.java index 2a1ff3510..f0092e792 100644 --- a/temporal-test-server/src/main/java/io/temporal/internal/testservice/TestVisibilityStoreImpl.java +++ b/temporal-test-server/src/main/java/io/temporal/internal/testservice/TestVisibilityStoreImpl.java @@ -28,7 +28,6 @@ import io.temporal.internal.common.ProtoEnumNameUtils; import io.temporal.internal.common.SearchAttributesUtil; import java.util.Collections; -import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nonnull; @@ -42,6 +41,7 @@ class TestVisibilityStoreImpl implements TestVisibilityStore { private static final String DEFAULT_KEY_DATE_TIME = "CustomDatetimeField"; private static final String DEFAULT_KEY_DOUBLE = "CustomDoubleField"; private static final String DEFAULT_KEY_BOOL = "CustomBoolField"; + private static final String TEMPORAL_CHANGE_VERSION = "TemporalChangeVersion"; private final Map searchAttributes = new ConcurrentHashMap<>( @@ -53,9 +53,11 @@ class TestVisibilityStoreImpl implements TestVisibilityStore { .put(DEFAULT_KEY_DOUBLE, IndexedValueType.INDEXED_VALUE_TYPE_DOUBLE) .put(DEFAULT_KEY_BOOL, IndexedValueType.INDEXED_VALUE_TYPE_BOOL) .put(DEFAULT_KEY_DATE_TIME, IndexedValueType.INDEXED_VALUE_TYPE_DATETIME) + .put(TEMPORAL_CHANGE_VERSION, IndexedValueType.INDEXED_VALUE_TYPE_KEYWORD_LIST) .build()); - private final Map executionSearchAttributes = new HashMap<>(); + private final Map executionSearchAttributes = + new ConcurrentHashMap<>(); @Override public void addSearchAttribute(String name, IndexedValueType type) {