diff --git a/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java b/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java index ab0c19f7..e7c429e6 100644 --- a/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java +++ b/ingest/src/test/java/com/microsoft/azure/kusto/ingest/E2ETest.java @@ -131,17 +131,11 @@ class E2ETest { @AfterAll public static void tearDown() { try { - queryClient.executeToJsonResult(databaseName, String.format(".drop table %s ifexists", tableName)); + new ExponentialRetry(2).execute(attempt -> queryClient.execute(databaseName, String.format(".drop table %s ifexists", tableName))); ingestClient.close(); managedStreamingIngestClient.close(); } catch (Exception ex) { - try { - queryClient.executeToJsonResult(databaseName, String.format(".drop table %s ifexists", tableName)); - ingestClient.close(); - managedStreamingIngestClient.close(); - } catch (Exception ex2) { - Assertions.fail("Failed to drop table", ex2); - } + Assertions.fail("Failed to drop table", ex); } }