Optimize IoTDBRestServiceIT errorInsertRecords#17371
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #17371 +/- ##
=========================================
Coverage 39.78% 39.78%
Complexity 312 312
=========================================
Files 5127 5127
Lines 346295 346311 +16
Branches 44100 44105 +5
=========================================
+ Hits 137770 137780 +10
- Misses 208525 208531 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
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
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.



This pull request refactors the
errorInsertRecordsintegration test inIoTDBRestServiceIT.javato simplify its setup and improve maintainability. The test now uses the sharedEnvFactoryenvironment instead of creating a customSimpleEnvcluster, and the verification logic has been streamlined.Test refactoring and simplification:
errorInsertRecordstest no longer creates and manages a separateSimpleEnvcluster; it now uses the sharedEnvFactoryenvironment for consistency and simplicity.EnvFactory, sending error insert requests to each and verifying the count of inserted records matches the number of data nodes. [1] [2]Code cleanup:
SimpleEnv, consensus factories, andResultSetMetaDatahave been removed for clarity. [1] [2] [3]@Ignoreannotation was removed, re-enabling the test.Thread.sleep(1000)withTimeUnit.SECONDS.sleep(1)for improved readability and consistency.