-
Notifications
You must be signed in to change notification settings - Fork 170
Add tests for new class implementation #3014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+1,011
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add test classes for the new RAG chat functionality: - ChatMessageTest: tests for ChatMessage entity and ChatSource - ChatSessionTest: tests for ChatSession entity - LlmMessageTest: tests for LlmMessage class - LlmChatRequestTest: tests for LlmChatRequest class - LlmChatResponseTest: tests for LlmChatResponse class - LlmExceptionTest: tests for LlmException class
marevol
added a commit
that referenced
this pull request
Jan 12, 2026
Add test classes for the new RAG chat functionality: - ChatMessageTest: tests for ChatMessage entity and ChatSource - ChatSessionTest: tests for ChatSession entity - LlmMessageTest: tests for LlmMessage class - LlmChatRequestTest: tests for LlmChatRequest class - LlmChatResponseTest: tests for LlmChatResponse class - LlmExceptionTest: tests for LlmException class Co-authored-by: Claude <noreply@anthropic.com>
marevol
added a commit
that referenced
this pull request
Jan 12, 2026
* feat: add RAG chat functionality with LLM integration Implement RAG (Retrieval-Augmented Generation) chat feature that enables conversational search using LLM providers. The feature integrates Fess search results as context for generating AI-powered responses. Key components: - LLM client abstraction with support for Ollama, OpenAI, and Gemini - Chat session management with message history - REST API with SSE streaming support (/api/v1/chat/stream) - Web UI with chat interface accessible from header - Configurable via fess_config.properties Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: add unit tests for RAG chat and LLM classes (#3014) Add test classes for the new RAG chat functionality: - ChatMessageTest: tests for ChatMessage entity and ChatSource - ChatSessionTest: tests for ChatSession entity - LlmMessageTest: tests for LlmMessage class - LlmChatRequestTest: tests for LlmChatRequest class - LlmChatResponseTest: tests for LlmChatResponse class - LlmExceptionTest: tests for LlmException class Co-authored-by: Claude <noreply@anthropic.com> * test: add unit tests for improved test coverage (#3011) * test: add unit tests for improved test coverage Add unit tests for previously untested components: - Service layer: FessAppServiceTest for base service functionality - Storage: StorageItemTest, StorageTypeTest for storage classes - Pagers: 24 new pager tests covering GroupPager, RolePager, UserPager, SchedulerPager, PathMapPager, KeyMatchPager, ElevateWordPager, FailureUrlPager, JobLogPager, FileConfigPager, WebConfigPager, RelatedContentPager, RelatedQueryPager, RoleTypePager, SearchLogPager, WebAuthPager, FileAuthPager, ReqHeaderPager, SynonymPager, KuromojiPager, StopwordsPager, ProtwordsPager, StemmerOverridePager, LabelTypePager - App jobs: AllJobSchedulerTest, ScriptExecutorJobTest for job scheduling These tests address the major coverage gaps identified in the analysis of the service layer (0%), pager classes (22.6%), storage classes (0%), and app job classes (0%). * fix: correct pager test field references to match actual class fields Update pager tests to use correct fields that exist in the pager classes: - SearchLogPagerTest: Use queryId, userSessionId, requestedTimeRange, accessType, logType instead of nonexistent id, searchWord, versionNo - WebAuthPagerTest: Use port, username, webConfigId instead of hostname - FailureUrlPagerTest: Use threadName, errorCount, errorName instead of versionNo - FileAuthPagerTest: Use port, username, fileConfigId instead of hostname - JobLogPagerTest: Use jobStatus, target, scriptType instead of versionNo --------- Co-authored-by: Claude <noreply@anthropic.com> * test: add assertSame helper methods to UnitFessTestCase Add assertSame methods (with and without message parameter) to the base test case class for JUnit 5 compatibility. Also apply code formatting to LlmChatRequestTest. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(test): add JUnit 5 annotations to FessAppServiceTest Add missing @beforeeach and @test annotations for JUnit 5 compatibility. Update setUp method signature to match UnitFessTestCase base class. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add RAG chat functionality with LLM integration Implement RAG (Retrieval-Augmented Generation) chat feature that enables conversational search using LLM providers. The feature integrates Fess search results as context for generating AI-powered responses. Key components: - LLM client abstraction with support for Ollama, OpenAI, and Gemini - Chat session management with message history - REST API with SSE streaming support (/api/v1/chat/stream) - Web UI with chat interface accessible from header - Configurable via fess_config.properties Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: add unit tests for RAG chat and LLM classes (#3014) Add test classes for the new RAG chat functionality: - ChatMessageTest: tests for ChatMessage entity and ChatSource - ChatSessionTest: tests for ChatSession entity - LlmMessageTest: tests for LlmMessage class - LlmChatRequestTest: tests for LlmChatRequest class - LlmChatResponseTest: tests for LlmChatResponse class - LlmExceptionTest: tests for LlmException class Co-authored-by: Claude <noreply@anthropic.com> * test: add assertSame helper methods to UnitFessTestCase Add assertSame methods (with and without message parameter) to the base test case class for JUnit 5 compatibility. Also apply code formatting to LlmChatRequestTest. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: add Javadoc to chat component helper methods Add documentation to getChatSessionManager() and getChatClient() methods in ComponentUtil for improved API clarity. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor: remove duplicate chat helper methods in ComponentUtil Remove redundant getChatSessionManager() and getChatClient() methods that were duplicated without Javadoc documentation, keeping only the properly documented versions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(chat): enhance RAG chat with improved logging, error handling, and UI - Add debug logging to WebApiManagerFactory, ChatApiManager, ChatClient, and LlmClientManager for better request tracing - Improve error handling in stream responses to prevent writing to committed responses - Update header.jsp to toggle search bar visibility on chat page and add search link for navigation back to search - Enhance chat.css with flexbox layout for better viewport height usage - Add waiting indicator text when streaming response starts - Add i18n labels for chat feature across all language files - Register chatPage flag in ChatAction for conditional rendering Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(chat): add multi-phase RAG flow with intent detection and markdown rendering Add enhanced streaming chat with multi-phase RAG (Retrieval-Augmented Generation) flow: - Add ChatIntent enum for classifying user intent (search, summary, FAQ, chat) - Add IntentDetectionResult and RelevanceEvaluationResult for structured LLM responses - Add ChatPhaseCallback for progress notifications during multi-phase processing - Add MarkdownRenderer using commonmark and OWASP HTML Sanitizer for safe HTML output - Enhance ChatClient with streamChatEnhanced() supporting: - Intent detection phase - Keyword search phase - Relevance evaluation phase - Content retrieval phase - Answer generation with streaming - Markdown to HTML rendering - Update chat.js to display phase progress and rendered HTML Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add test classes for the new RAG chat functionality: