test: optimize OpenSearchVectorStoreTest.java

This commit is contained in:
Michael Yang 2024-08-13 10:03:18 +08:00
parent e2383b0336
commit eae0ca3589
4 changed files with 62 additions and 1 deletions

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2023-2025, Agents-Flex (fuhai999@gmail.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.agentsflex.core.store.exception; package com.agentsflex.core.store.exception;
/** /**

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2023-2025, Agents-Flex (fuhai999@gmail.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.agentsflex.store.opensearch; package com.agentsflex.store.opensearch;
import com.agentsflex.core.document.Document; import com.agentsflex.core.document.Document;

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2023-2025, Agents-Flex (fuhai999@gmail.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.agentsflex.store.opensearch; package com.agentsflex.store.opensearch;
import java.io.Serializable; import java.io.Serializable;

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2023-2025, Agents-Flex (fuhai999@gmail.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.agentsflex.store.opensearch; package com.agentsflex.store.opensearch;
import com.agentsflex.core.document.Document; import com.agentsflex.core.document.Document;
@ -6,6 +21,7 @@ import com.agentsflex.core.llm.embedding.EmbeddingOptions;
import com.agentsflex.core.store.SearchWrapper; import com.agentsflex.core.store.SearchWrapper;
import com.agentsflex.core.store.StoreOptions; import com.agentsflex.core.store.StoreOptions;
import com.agentsflex.core.store.VectorData; import com.agentsflex.core.store.VectorData;
import com.agentsflex.core.store.exception.StoreException;
import org.junit.Test; import org.junit.Test;
import java.util.ArrayList; import java.util.ArrayList;
@ -18,7 +34,7 @@ import java.util.List;
*/ */
public class OpenSearchVectorStoreTest { public class OpenSearchVectorStoreTest {
@Test @Test(expected = StoreException.class)
public void test01() { public void test01() {
OpenSearchVectorStore store = getOpenSearchVectorStore(); OpenSearchVectorStore store = getOpenSearchVectorStore();