@Test
  public void testFileDumpDeltaFilesWithoutStreamingOptimizations() throws Exception {
    String agentInfo = "UT_" + Thread.currentThread().getName();
    dropDB(msClient, dbName3);
    dropDB(msClient, dbName4);

    // 1) Create two bucketed tables
    String dbLocation = dbFolder.newFolder(dbName3).getCanonicalPath() + ".db";
    dbLocation = dbLocation.replaceAll("\\\\", "/"); // for windows paths
    String[] colNames = "key1,key2,data".split(",");
    String[] colTypes = "string,int,string".split(",");
    String[] bucketNames = "key1,key2".split(",");
    int bucketCount = 4;
    createDbAndTable(driver, dbName3, tblName3, null, colNames, colTypes, bucketNames
      , null, dbLocation, bucketCount);

    // 2) Insert data into both tables
    StrictDelimitedInputWriter writer = StrictDelimitedInputWriter.newBuilder()
      .withFieldDelimiter(',')
      .build();

    HiveStreamingConnection connection = HiveStreamingConnection.newBuilder()
      .withDatabase(dbName3)
      .withTable(tblName3)
      .withAgentInfo(agentInfo)
      .withHiveConf(conf)
      .withRecordWriter(writer)
      .withStreamingOptimizations(false)
      .connect();
    connection.beginTransaction();
    connection.write("name0,1,streaming".getBytes());
    connection.write("name2,2,streaming".getBytes());
    connection.write("name4,2,unlimited".getBytes());
    connection.write("name5,2,unlimited".getBytes());
    for (int i = 0; i < 6000; i++) {
      if (i % 2 == 0) {
        connection.write(("name" + i + "," + i + "," + "streaming").getBytes());
      } else {
        connection.write(("name" + i + "," + i + "," + "unlimited").getBytes());
      }
    }
    connection.commitTransaction();
    connection.close();

    PrintStream origOut = System.out;
    ByteArrayOutputStream myOut = new ByteArrayOutputStream();

    // replace stderr and run command
    System.setOut(new PrintStream(myOut));
    FileDump.main(new String[]{dbLocation});
    System.out.flush();
    System.setOut(origOut);

    String outDump = new String(myOut.toByteArray());
    Assert.assertEquals(true, outDump.contains("Compression: ZLIB"));
    Assert.assertEquals(true, outDump.contains("Encoding column 9: DICTIONARY"));
  }
check that transactions that have not heartbeated and timedout get properly aborted

@throws Exception
streaming/src/test/org/apache/hive/streaming/TestStreaming.java