Skip to content

Commit

Permalink
Remove extra deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza Jugon committed Nov 21, 2024
1 parent 9bf7248 commit 4c45de2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ public void scheduleBeekeeperEvent() {
scheduler.scheduleForHousekeeping(entity);
} catch (BeekeeperIcebergException e) {
log.warn("Iceberg table are not supported in Beekeeper. Deleting message from queue", e);
beekeeperEventReader.delete(beekeeperEvent);
} catch (Exception e) {
throw new BeekeeperException(format(
"Unable to schedule %s deletion for entity, this message will go back on the queue",
entity.getLifecycleType()),
e);
entity.getLifecycleType()), e);
}
}
beekeeperEventReader.delete(beekeeperEvent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void icebergValidatorThrowsException() {
verify(icebergValidator).throwExceptionIfIceberg(databaseName, tableName);
verifyNoInteractions(pathSchedulerService);
verifyNoInteractions(tableSchedulerService);
verify(beekeeperEventReader, times(2)).delete(event.get()); // We need to fix this, we are deleting twice, not sure why
verify(beekeeperEventReader).delete(event.get());
}

@Test
Expand Down

0 comments on commit 4c45de2

Please sign in to comment.