Skip to content

Commit 3174988

Browse files
authored
fix failed ut (#4459)
Signed-off-by: Yaliang Wu <[email protected]>
1 parent 44d610d commit 3174988

File tree

5 files changed

+138
-123
lines changed

5 files changed

+138
-123
lines changed

common/src/test/java/org/opensearch/ml/common/agent/MLAgentTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,11 +690,11 @@ public void writeTo_ReadFrom_ContextManagementName() throws IOException {
690690
);
691691

692692
BytesStreamOutput output = new BytesStreamOutput();
693-
output.setVersion(CommonValue.VERSION_3_3_0);
693+
output.setVersion(CommonValue.VERSION_3_4_0);
694694
agent.writeTo(output);
695695

696696
StreamInput streamInput = output.bytes().streamInput();
697-
streamInput.setVersion(CommonValue.VERSION_3_3_0);
697+
streamInput.setVersion(CommonValue.VERSION_3_4_0);
698698
MLAgent deserializedAgent = new MLAgent(streamInput);
699699

700700
assertEquals("template_name", deserializedAgent.getContextManagementTemplateName());
@@ -731,11 +731,11 @@ public void writeTo_ReadFrom_ContextManagementInline() throws IOException {
731731
);
732732

733733
BytesStreamOutput output = new BytesStreamOutput();
734-
output.setVersion(CommonValue.VERSION_3_3_0);
734+
output.setVersion(CommonValue.VERSION_3_4_0);
735735
agent.writeTo(output);
736736

737737
StreamInput streamInput = output.bytes().streamInput();
738-
streamInput.setVersion(CommonValue.VERSION_3_3_0);
738+
streamInput.setVersion(CommonValue.VERSION_3_4_0);
739739
MLAgent deserializedAgent = new MLAgent(streamInput);
740740

741741
assertNull(deserializedAgent.getContextManagementTemplateName());

plugin/src/main/java/org/opensearch/ml/action/memorycontainer/TransportCreateMemoryContainerAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public TransportCreateMemoryContainerAction(
123123
this.remoteMemoryStoreHelper = remoteMemoryStoreHelper;
124124
trustedConnectorEndpointsRegex = ML_COMMONS_TRUSTED_CONNECTOR_ENDPOINTS_REGEX.get(settings);
125125
this.memoryContainerPipelineHelper = memoryContainerPipelineHelper;
126-
clusterService
126+
this.clusterService
127127
.getClusterSettings()
128128
.addSettingsUpdateConsumer(ML_COMMONS_TRUSTED_CONNECTOR_ENDPOINTS_REGEX, it -> trustedConnectorEndpointsRegex = it);
129129
}

0 commit comments

Comments
 (0)