// Path: src/test/java/net/pixelcop/sewer/sink/durable/TestReliableSink.java
// public class TestReliableSink extends AbstractNodeTest {
// 
//   @Test
//   public void testFailureBuffersToDisk() throws IOException, InterruptedException {
// 
//     TestableNode node = createNode("gen(1000)", "reliable > failopen > counting");
// 
//     // start node, opens source, blocks until all events sent
//     node.start();
//     node.await();
//     node.cleanup();
// 
//     TestableTransactionManager.kill();
// 
//     // now check expected results (buffers on disk, no appends on ultimate subsink)
//     assertEquals(0, CountingSink.getAppendCount());
//     assertEquals(0, TestableTransactionManager.getTransactions().size());
//     assertEquals(1, TestableTransactionManager.getFailedTransactions().size());
// 
//     // check count of events written to disk
//     node.getTxTestHelper().verifyRecordsInBuffers(1, 1000, new StringEvent());
//     node.getTxTestHelper().assertTxLogExists();
//   }
// 
//   @Test
//   public void testTxManagerDrainsFailedBatch() throws IOException, InterruptedException {
// 
//     TestableNode node = createNode("gen(1000)", "reliable > failopen > counting");
// 
//     // start node, opens source, blocks until all events sent
//     node.start();
//     node.await();
//     node.cleanup();
// 
//     // now check expected results (buffers on disk, no appends on ultimate subsink)
//     assertEquals(0, CountingSink.getAppendCount());
// 
// 
//     // check count of events written to disk
//     node.getTxTestHelper().verifyRecordsInBuffers(1, 1000, new StringEvent());
// 
// 
//     TestableTransactionManager.kill();
//     node.getTxTestHelper().assertTxLogExists();
// 
//     // now we should still have 1 lost tx, but 0 in progress
//     assertEquals(0, TestableTransactionManager.getTransactions().size());
//     assertEquals(1, TestableTransactionManager.getFailedTransactions().size());
// 
// 
//     // now lets try to restart the txman and drain this thing
//     // create a new node & txman using the old tmp path
//     node = createNode("null", "reliable > counting", node.getTxTestHelper().getTmpWalPath());
// 
//     // makes sure we reloaded from disk on reset()
//     assertEquals(0, TestableTransactionManager.getTransactions().size());
//     assertTrue("txns loaded from disk", TestableTransactionManager.hasTransactions());
// 
//     TestableTransactionManager.await();
//     TestableTransactionManager.kill();
// 
//     TestableTransactionManager.assertNoTransactions();
//     assertEquals(1000, CountingSink.getAppendCount());
//   }
// 
// }
// 
// Path: src/test/java/net/pixelcop/sewer/sink/durable/TestRollSink.java
// public class TestRollSink extends AbstractNodeTest {
// 
//   @Test
//   public void testSimpleRollCount() throws IOException, InterruptedException {
// 
//     // gen 3 events, 1 sec apart (each event is 32 bytes)
//     TestableNode node = createAndStartNode("gen(3, 32, 1000)", "roll(1) > counting");
// 
//     assertTrue(CountingSink.getOpenCount() > 1);
//     assertTrue(CountingSink.getCloseCount() > 1);
//   }
// 
// }


import net.pixelcop.sewer.sink.durable.TestReliableSequenceFileSink;
import net.pixelcop.sewer.sink.durable.TestReliableSink;
import net.pixelcop.sewer.sink.durable.TestRollSink;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
package net.pixelcop.sewer.sink;



@RunWith(Suite.class)
@SuiteClasses({ TestRollSink.class, TestReliableSink.class, TestReliableSequenceFileSink.class })
// Path: src/test/java/net/pixelcop/sewer/sink/durable/TestReliableSink.java
// public class TestReliableSink extends AbstractNodeTest {
// 
//   @Test
//   public void testFailureBuffersToDisk() throws IOException, InterruptedException {
// 
//     TestableNode node = createNode("gen(1000)", "reliable > failopen > counting");
// 
//     // start node, opens source, blocks until all events sent
//     node.start();
//     node.await();
//     node.cleanup();
// 
//     TestableTransactionManager.kill();
// 
//     // now check expected results (buffers on disk, no appends on ultimate subsink)
//     assertEquals(0, CountingSink.getAppendCount());
//     assertEquals(0, TestableTransactionManager.getTransactions().size());
//     assertEquals(1, TestableTransactionManager.getFailedTransactions().size());
// 
//     // check count of events written to disk
//     node.getTxTestHelper().verifyRecordsInBuffers(1, 1000, new StringEvent());
//     node.getTxTestHelper().assertTxLogExists();
//   }
// 
//   @Test
//   public void testTxManagerDrainsFailedBatch() throws IOException, InterruptedException {
// 
//     TestableNode node = createNode("gen(1000)", "reliable > failopen > counting");
// 
//     // start node, opens source, blocks until all events sent
//     node.start();
//     node.await();
//     node.cleanup();
// 
//     // now check expected results (buffers on disk, no appends on ultimate subsink)
//     assertEquals(0, CountingSink.getAppendCount());
// 
// 
//     // check count of events written to disk
//     node.getTxTestHelper().verifyRecordsInBuffers(1, 1000, new StringEvent());
// 
// 
//     TestableTransactionManager.kill();
//     node.getTxTestHelper().assertTxLogExists();
// 
//     // now we should still have 1 lost tx, but 0 in progress
//     assertEquals(0, TestableTransactionManager.getTransactions().size());
//     assertEquals(1, TestableTransactionManager.getFailedTransactions().size());
// 
// 
//     // now lets try to restart the txman and drain this thing
//     // create a new node & txman using the old tmp path
//     node = createNode("null", "reliable > counting", node.getTxTestHelper().getTmpWalPath());
// 
//     // makes sure we reloaded from disk on reset()
//     assertEquals(0, TestableTransactionManager.getTransactions().size());
//     assertTrue("txns loaded from disk", TestableTransactionManager.hasTransactions());
// 
//     TestableTransactionManager.await();
//     TestableTransactionManager.kill();
// 
//     TestableTransactionManager.assertNoTransactions();
//     assertEquals(1000, CountingSink.getAppendCount());
//   }
// 
// }
// 
// Path: src/test/java/net/pixelcop/sewer/sink/durable/TestRollSink.java
// public class TestRollSink extends AbstractNodeTest {
// 
//   @Test
//   public void testSimpleRollCount() throws IOException, InterruptedException {
// 
//     // gen 3 events, 1 sec apart (each event is 32 bytes)
//     TestableNode node = createAndStartNode("gen(3, 32, 1000)", "roll(1) > counting");
// 
//     assertTrue(CountingSink.getOpenCount() > 1);
//     assertTrue(CountingSink.getCloseCount() > 1);
//   }
// 
// }


// Path: src/test/java/net/pixelcop/sewer/sink/SinkTestSuite.java
import net.pixelcop.sewer.sink.durable.TestReliableSequenceFileSink;
import net.pixelcop.sewer.sink.durable.TestReliableSink;
import net.pixelcop.sewer.sink.durable.TestRollSink;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

package net.pixelcop.sewer.sink;



@RunWith(Suite.class)
@SuiteClasses({ TestRollSink.class, TestReliableSink.class, TestReliableSequenceFileSink.class })
public class SinkTestSuite {