public void testGetTimeout() {
Properties p = new Properties();
p.setProperty(TransactionCoordinator.TXN_TIMEOUT_PROPERTY, "5000");
p.setProperty(TransactionCoordinator.TXN_UNBOUNDED_TIMEOUT_PROPERTY,
"100000");
TransactionCoordinator coordinator =
new TransactionCoordinatorImpl(p, collectorHandle);
Transaction txn = coordinator.createTransaction(
coordinator.getDefaultTimeout()).getTransaction();
assertTrue("Incorrect bounded Transaction timeout: " +
txn.getTimeout(),
txn.getTimeout() == 5000);
txn = coordinator.createTransaction(
ScheduledTask.UNBOUNDED).getTransaction();
assertTrue("Incorrect unbounded Transaction timeout: " +
txn.getTimeout(),
txn.getTimeout() == 100000);
}