Ensure proper table cleanup when data setup fails
@@ -40,7 +40,13 @@ public class CreateAndInsertDataSetup
public TestTable setupTestTable(List<DataTypeTest.Input<?>> inputs)
{
TestTable testTable = createTestTable(inputs);
+ try {
insertRows(testTable, inputs);
+ }
+ catch (Exception e) {
+ testTable.close();
+ throw e;
+ }
return testTable;
}
