@Test
  public void testDirectlyFlushChunk() throws Exception {
    long originTargetChunkSize = IoTDBDescriptor.getInstance().getConfig().getTargetChunkSize();
    long originTargetChunkPointNum =
        IoTDBDescriptor.getInstance().getConfig().getTargetChunkPointNum();
    IoTDBDescriptor.getInstance().getConfig().setTargetChunkSize(100);
    IoTDBDescriptor.getInstance().getConfig().setTargetChunkPointNum(100);
    try {
      List<TsFileResource> sourceFiles = new ArrayList();
      int fileNum = 6;
      long pointStep = 200L;
      for (int i = 0; i < fileNum; ++i) {
        List<List<Long>> chunkPagePointsNum = new ArrayList<>();
        List<Long> pagePointsNum = new ArrayList<>();
        pagePointsNum.add((i + 1L) * pointStep);
        chunkPagePointsNum.add(pagePointsNum);
        TsFileResource resource =
            new TsFileResource(new File(SEQ_DIRS, String.format("%d-%d-0-0.tsfile", i + 1, i + 1)));
        sourceFiles.add(resource);
        CompactionFileGeneratorUtils.writeTsFile(
            fullPathSet, chunkPagePointsNum, i * 1500L, resource);
      }
      Map<IFullPath, List<TimeValuePair>> originData =
          CompactionCheckerUtils.getDataByQuery(paths, sourceFiles, new ArrayList<>());
      TsFileNameGenerator.TsFileName tsFileName =
          TsFileNameGenerator.getTsFileName(sourceFiles.get(0).getTsFile().getName());
      TsFileResource targetResource =
          TsFileNameGenerator.getInnerCompactionTargetFileResource(sourceFiles, true);
      performer.setSourceFiles(sourceFiles);
      performer.setTargetFiles(Collections.singletonList(targetResource));
      performer.setSummary(new CompactionTaskSummary());
      performer.perform();
      CompactionUtils.moveTargetFile(
          Collections.singletonList(targetResource), CompactionTaskType.INNER_SEQ, storageGroup);
      Map<String, List<List<Long>>> chunkPagePointsNumMerged = new HashMap<>();
      long[] points = new long[fileNum];
      for (int i = 1; i <= fileNum; i++) {
        points[i - 1] = i * pointStep;
      }
      for (String path : fullPathSet) {
        CompactionCheckerUtils.putOnePageChunks(chunkPagePointsNumMerged, path, points);
      }
      CompactionCheckerUtils.checkChunkAndPage(chunkPagePointsNumMerged, targetResource);
      Map<IFullPath, List<TimeValuePair>> compactedData =
          CompactionCheckerUtils.getDataByQuery(
              paths, Collections.singletonList(targetResource), new ArrayList<>());
      CompactionCheckerUtils.validDataByValueList(originData, compactedData);
    } finally {
      IoTDBDescriptor.getInstance().getConfig().setTargetChunkSize(originTargetChunkSize);
      IoTDBDescriptor.getInstance().getConfig().setTargetChunkPointNum(originTargetChunkPointNum);
    }
  }
Generate files that each chunk is greater than target size, so it can be read into memory and
directly flush to target files.

@throws Exception
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/inner/ReadChunkCompactionPerformerNoAlignedTest.java