LanderTaskRunner { void onException(String acquisitionInstant, Throwable t) { if (t instanceof NoDataToLandException) { log.info("Last landing '{}' found no data", acquisitionInstant); changeState(State.IDLE); return; } log.info("Error landing partition {} - {}", acquisitionInstant, t.getMessage()); log.error("Problem landing data", t); changeState(State.IDLE); } LanderTaskRunner(
      MeterRegistry registry,
      OffsetManager offsetManager,
      String roadName,
      String topicName,
      String database,
      HivePartitionManager hivePartitionManager,
      Lander.Factory landerFactory,
      HiveNotificationHandler landingHandler,
      PatchSetEmitter emitter,
      Clock clock,
      long maxRecordsPerPartition,
      boolean enableServerSideEncryption,
      int landingTimeoutMinutes); boolean run(OffsetDateTime runtimeDateTime); static final String ACQUISITION_INSTANT; static final String REVISION_INSTANT; }
@Test public void onNoDataException() throws Exception { underTest.onException(ACQUISITION_INSTANT, new CompletionException(new NoDataToLandException())); verify(emitter, never()).emit(any()); }
@Test public void onOtherException() throws Exception { underTest.onException(ACQUISITION_INSTANT, new RuntimeException("test message")); verify(emitter, never()).emit(any()); }