Skip to content

Commit 326ea91

Browse files
committed
feat(phase4): add comprehensive async tool calling tests
Phase 4: Testing and Validation - COMPLETED ✅ Added Tests (15 total, all passing): ================================= 1. AsyncToolCallbackTest.java (8 tests) ✅ testCallAsyncReturnsExpectedResult ✅ testCallAsyncWithDelay ✅ testSupportsAsyncDefaultIsTrue ✅ testSupportsAsyncCanBeOverridden ✅ testSynchronousFallbackCallBlocksOnAsync ✅ testSynchronousFallbackWithDelayedAsync ✅ testAsyncErrorHandling ✅ testAsyncCallbackWithReturnDirect 2. DefaultToolCallingManagerAsyncTests.java (7 tests) ✅ testExecuteToolCallsAsyncWithAsyncToolCallback ✅ testExecuteToolCallsAsyncWithSyncToolCallback ✅ testExecuteToolCallsAsyncWithMixedTools ✅ testExecuteToolCallsAsyncWithReturnDirectTrue ✅ testExecuteToolCallsAsyncWithMultipleToolsReturnDirectLogic ✅ testExecuteToolCallsAsyncWithAsyncToolError ✅ testExecuteToolCallsAsyncWithNullArguments Interface Updates: ================== - Added call(String) default method to AsyncToolCallback - Ensures backward compatibility with ToolCallback interface - Proper delegation chain: call(String) -> call(String, ToolContext) -> callAsync() Test Coverage: ============== ✅ Async tool execution ✅ Sync tool fallback ✅ Mixed async/sync tools ✅ Error handling ✅ ReturnDirect logic ✅ Null/empty arguments handling ✅ Tool context support ✅ Delay testing All tests passing: 15/15 (100%) Related: #async-tool-support Signed-off-by: shaojie <741047428@qq.com>
1 parent e924744 commit 326ea91

File tree

5 files changed

+1199
-0
lines changed

5 files changed

+1199
-0
lines changed

0 commit comments

Comments
 (0)