From 289de77d48c1bff6e9b67aa143ba5d45ac0680e6 Mon Sep 17 00:00:00 2001 From: asafmahlev Date: Mon, 3 Jun 2024 16:42:23 +0300 Subject: [PATCH] Retry final teardown --- .../java/com/microsoft/azure/kusto/ingest/E2ETest.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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); } }