Skip to content

Commit bc2063f

Browse files
authored
fix: PR16943 type error (#16948)
1 parent 9f8b4cc commit bc2063f

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,8 @@ private void releaseTVListOwnedByQuery() {
874874
try {
875875
queryContextSet.remove(this);
876876
if (tvList.getOwnerQuery() == this) {
877-
if (LOGGER.isDebugEnabled()) {
878-
if (queryContextSet.isEmpty()) {
877+
if (queryContextSet.isEmpty()) {
878+
if (LOGGER.isDebugEnabled()) {
879879
LOGGER.debug(
880880
"TVList {} is released by the query, FragmentInstance Id is {}",
881881
tvList,

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecutionTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import static org.apache.iotdb.db.queryengine.common.QueryId.MOCK_QUERY_ID;
5050
import static org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext.createFragmentInstanceContext;
5151
import static org.junit.Assert.assertEquals;
52-
import static org.junit.Assert.assertFalse;
5352
import static org.junit.Assert.assertTrue;
5453
import static org.junit.Assert.fail;
5554

@@ -149,14 +148,12 @@ public void testTVListOwnerTransfer() throws InterruptedException {
149148
}
150149
} finally {
151150
// Restore original System.out
152-
System.setErr(systemOut);
151+
System.setOut(systemOut);
153152

154153
// should not contain warn message: "The memory cost to be released is larger than the memory
155154
// cost of memory block"
156155
String capturedOutput = logPrint.toString();
157-
assertFalse(
158-
"Should not contain error message",
159-
capturedOutput.contains("is more than allocated memory"));
156+
assertTrue(capturedOutput.isEmpty());
160157
}
161158
}
162159

0 commit comments

Comments
 (0)