Skip to content

Commit eec38d6

Browse files
committed
Fix failed test in AbstractRetrieverToolTests
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent b2db2c1 commit eec38d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/opensearch/agent/tools/AbstractRetrieverToolTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ public void testRunAsyncWithIllegalQueryThenListenerOnFailure() {
165165
mockedImpl.run(null, listener4);
166166

167167
Exception exception4 = assertThrows(Exception.class, future4::join);
168-
assertTrue(exception4.getCause() instanceof NullPointerException);
168+
// parameter is re-created with extractInputParameters, thus will not be null
169+
assertTrue(exception4.getCause() instanceof IllegalArgumentException);
170+
assertEquals(exception4.getCause().getMessage(), "[input] is null or empty, can not process it.");
169171
}
170172

171173
@Test

0 commit comments

Comments
 (0)