Skip to content

Commit

Permalink
remove printout leftovers in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Zhang <[email protected]>
  • Loading branch information
Zhangxunmt committed Jan 18, 2024
1 parent 826b130 commit a3f1d62
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ public void testFromRestRequest() throws IOException {
.withContent(new BytesArray(gson.toJson(params)), MediaTypeRegistry.JSON)
.build();
CreateInteractionRequest request = CreateInteractionRequest.fromRestRequest(rrequest);
System.out.println(request.getConversationId());
System.out.println(request.getInput());

assert (request.validate() == null);
assert (request.getConversationId().equals("cid"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public void testToXContent() throws IOException {
XContentBuilder builder = XContentBuilder.builder(XContentType.JSON.xContent());
response.toXContent(builder, ToXContent.EMPTY_PARAMS);
String result = BytesReference.bytes(builder).utf8ToString();
System.out.println(result);
String expected = "{\"memory_id\":\"cid\",\"message_id\":\"iid\",\"create_time\":\""
+ interaction.getCreateTime()
+ "\",\"input\":\"inp\",\"prompt_template\":\"pt\",\"response\":\"rsp\",\"origin\":\"ogn\",\"additional_info\":{\"metadata\":\"some meta\"}}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public void testToXContent_MoreTokens() throws IOException {
XContentBuilder builder = XContentBuilder.builder(XContentType.JSON.xContent());
response.toXContent(builder, ToXContent.EMPTY_PARAMS);
String result = BytesReference.bytes(builder).utf8ToString();
System.out.println(result);
String expected = "{\"traces\":[{\"memory_id\":\"cid\",\"message_id\":\"id0\",\"create_time\":"
+ trace.getCreateTime()
+ ",\"input\":\"input\",\"prompt_template\":\"pt\",\"response\":\"response\",\"origin\":\"origin\",\"additional_info\":{\"metadata\":\"some meta\"},\"parent_message_id\":\"parent_id\",\"trace_number\":1}],\"next_token\":2}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ public void testGetInteractions_NoAccessNoUser_ThenFail() {
mlMemoryManager.getFinalInteractions("cid", 10, interactionListActionListener);
ArgumentCaptor<Exception> argCaptor = ArgumentCaptor.forClass(Exception.class);
verify(interactionListActionListener, times(1)).onFailure(argCaptor.capture());
System.out.println(argCaptor.getValue().getMessage());
assert (argCaptor.getValue().getMessage().equals("User [] does not have access to conversation cid"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ private void registerModel(MLRegisterModelInput registerModelInput, ActionListen
throw new IllegalArgumentException("URL can't match trusted url regex");
}
}
System.out.println("registering the model");

boolean isAsync = registerModelInput.getFunctionName() != FunctionName.REMOTE;
MLTask mlTask = MLTask
.builder()
Expand Down

0 comments on commit a3f1d62

Please sign in to comment.