@Test
  public void testReceiverNotLoadDeletedTimeseries() throws Exception {
    final DataNodeWrapper receiverDataNode = receiverEnv.getDataNodeWrapper(0);
    final String receiverIp = receiverDataNode.getIp();
    final int receiverPort = receiverDataNode.getPort();

    final Map<String, String> extractorAttributes = new HashMap<>();
    final Map<String, String> processorAttributes = new HashMap<>();
    final Map<String, String> connectorAttributes = new HashMap<>();

    // Enable mods transfer
    extractorAttributes.put("source.mods.enable", "true");

    connectorAttributes.put("connector.batch.enable", "false");
    connectorAttributes.put("connector.ip", receiverIp);
    connectorAttributes.put("connector.port", Integer.toString(receiverPort));

    try (final SyncConfigNodeIServiceClient client =
        (SyncConfigNodeIServiceClient) senderEnv.getLeaderConfigNodeConnection()) {
      // Generate TsFile and mods on sender. There are 6 time-series in total.
      // Time-series not affected by mods: d1.s1, d2.s1
      // Time-series partially deleted by mods: d1.s2, d3.s1
      // Time-series completely deleted by mods: d1.s3, d4.s1 (should not be loaded by receiver)
      if (!TestUtils.tryExecuteNonQueriesWithRetry(
          senderEnv,
          Arrays.asList(
              "insert into root.db.d1 (time, s1, s2, s3) values (1, 1, 1, 1), (3, 3, 3, 3)",
              "insert into root.db.d2 (time, s1) values (1, 1), (3, 3)",
              "insert into root.db.d3 (time, s1) values (1, 1), (3, 3)",
              "insert into root.db.d4 (time, s1) values (1, 1), (3, 3)",
              "flush",
              "delete from root.db.d1.s2 where time <= 2",
              "delete from root.db.d1.s3 where time >= 1 and time <= 3",
              "delete from root.db.d3.** where time <= 2",
              "delete from root.db.d4.** where time >= 1 and time <= 3",
              "flush"))) {
        return;
      }

      TSStatus status =
          client.createPipe(
              new TCreatePipeReq("p1", connectorAttributes)
                  .setExtractorAttributes(extractorAttributes)
                  .setProcessorAttributes(processorAttributes));
      Assert.assertEquals(TSStatusCode.SUCCESS_STATUS.getStatusCode(), status.getCode());
      Assert.assertEquals(
          TSStatusCode.SUCCESS_STATUS.getStatusCode(), client.startPipe("p1").getCode());

      TestUtils.assertDataEventuallyOnEnv(
          receiverEnv, "count timeseries", "count(timeseries),", Collections.singleton("4,"));
    }
  }
Test that when the receiver loads data from TsFile, it will not load timeseries that are
completed deleted by mods.

@throws Exception
integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/enhanced/IoTDBPipeWithLoadIT.java