Caideyipi opened a new pull request, #18346:
URL: https://github.com/apache/iotdb/pull/18346

   ## Description
   
   ### Problem
   
   `testNormalQueryWithCorruptedChunkDataOrPageReader` searched the entire 
DataNode `data/sequence` tree for the first TsFile. If another database had 
already created a TsFile, the test could corrupt that unrelated file and then 
incorrectly report that the target query succeeded.
   
   The test also only called `Statement.execute`, so an exception raised while 
fetching a later result block could be missed.
   
   ### Changes
   
   - Restrict the TsFile lookup to the test database's sequence directory.
   - Execute the query with `executeQuery` and consume the full result set so 
delayed corruption errors are surfaced.
   
   ### Verification
   
   - `mvn spotless:apply -pl integration-test -P with-integration-tests`
   - `mvn test-compile -pl integration-test -P with-integration-tests 
-DskipTests`
   - `git diff --check`
   
   This PR has:
   - [x] been self-reviewed.
   - [x] modified an existing integration test to cover the intended code path 
deterministically.
   
   ##### Key changed/added classes
   
   - `IoTDBQueryWithCorruptedTsFileIT`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to