nk1506 commented on code in PR #8853: URL: https://github.com/apache/iceberg/pull/8853#discussion_r1361945348
########## spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/SparkSQLExecutionHelper.java: ########## @@ -42,28 +45,26 @@ public static String lastExecutedMetricValue(SparkSession spark, String metricNa SQLExecutionUIData lastExecution = statusStore.executionsList().last(); Option<SQLPlanMetric> sqlPlanMetric = lastExecution.metrics().find(metric -> metric.name().equals(metricName)); - Assert.assertTrue( - String.format("Metric '%s' not found in last execution", metricName), - sqlPlanMetric.isDefined()); + assertThat(sqlPlanMetric.isDefined()) + .as(String.format("Metric '%s' not found in last execution", metricName)) + .isTrue(); long metricId = sqlPlanMetric.get().accumulatorId(); // Refresh metricValues, they will remain null until the execution is complete and metrics are // aggregated - int attempts = 3; - while (lastExecution.metricValues() == null && attempts > 0) { - try { - Thread.sleep(100); - attempts--; - } catch (InterruptedException e) { - throw new RuntimeException(e); - } + Awaitility.await() Review Comment: nit: is it a good idea to add some alias with `Awaitility` here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org