-
-
Notifications
You must be signed in to change notification settings - Fork 86
#2865 feat: create test-utils module and refactor test imports #2885
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
Conversation
Summary of ChangesHello @robfrank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the consistency and maintainability of the project's test suite by introducing a dedicated Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🧪 CI InsightsHere's what we observed from your CI run for 5bd7a26. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively refactors the test dependencies by introducing a new test-utils module and centralizing test helper classes. The changes are consistent across the codebase, replacing the arcadedb-server test-jar with the new arcadedb-test-utils artifact, which improves modularity and maintainability.
I've identified a few areas for improvement, mainly within the newly added utility classes. These include resource management, logging practices, and dependency versioning. I also found a critical issue in GloVeTest.java regarding a hardcoded file path that affects test portability. Please see my detailed comments for suggestions.
| public class GloVeTest { | ||
| private final static int PARALLEL_LEVEL = 8; | ||
| private static final String FILE_NAME = "/Users/luca/Downloads/glove.twitter.27B.100d.txt"; | ||
| private static final String FILE_NAME = "/Users/frank/Downloads/glove.twitter.27B/glove.twitter.27B.100d.txt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hardcoded absolute file path makes the test non-portable and will cause it to fail on any machine where the file doesn't exist at this exact location. Please consider moving the test file to the project's resources and loading it from there, or implementing a mechanism to download it if it's not present.
test-utils/src/main/java/com/arcadedb/test/BaseGraphServerTest.java
Outdated
Show resolved
Hide resolved
test-utils/src/main/java/com/arcadedb/test/WebSocketClientHelper.java
Outdated
Show resolved
Hide resolved
test-utils/src/main/java/com/arcadedb/test/BaseGraphServerTest.java
Outdated
Show resolved
Hide resolved
test-utils/src/main/java/com/arcadedb/test/StaticBaseServerTest.java
Outdated
Show resolved
Hide resolved
test-utils/src/main/java/com/arcadedb/test/TestServerHelper.java
Outdated
Show resolved
Hide resolved
test-utils/src/main/java/com/arcadedb/test/TestServerHelper.java
Outdated
Show resolved
Hide resolved
test-utils/src/main/java/com/arcadedb/test/WebSocketClientHelper.java
Outdated
Show resolved
Hide resolved
test-utils/src/main/java/com/arcadedb/test/WebSocketClientHelper.java
Outdated
Show resolved
Hide resolved
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
This pull request updates the test dependencies and refactors test imports across multiple modules to improve consistency and maintainability. The main change is replacing the use of
arcadedb-server(withtest-jartype) with the newarcadedb-test-utilsartifact for test scopes. Additionally, all test classes now import helper utilities from thecom.arcadedb.testpackage instead ofcom.arcadedb.server, ensuring a cleaner separation between production and test code.Dependency updates:
arcadedb-servertoarcadedb-test-utilsinpom.xmlfiles forconsole,graphql,gremlin, andgrpc-clientmodules, removing thetypespecification for test jars. [1] [2] [3] [4]Test code refactoring:
com.arcadedb.test.*classes (such asTestServerHelperandBaseGraphServerTest) instead of their previous locations incom.arcadedb.server.*across test files inconsole,gremlin, andgrpc-clientmodules. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]Console test improvements:
ConsoleAsyncInsertTestto use the new static import fromcom.arcadedb.test.StaticBaseServerTest. [1] [2]