All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.schedule.service.AsyncCompareCaseTaskRunnable Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package com.arextest.schedule.service;

import com.arextest.common.runnable.AbstractContextWithTraceRunnable;
import com.arextest.schedule.comparer.ReplayResultComparer;
import com.arextest.schedule.mdc.AbstractTracedRunnable;
import com.arextest.schedule.model.ReplayActionCaseItem;
import lombok.extern.slf4j.Slf4j;

/**
 * @author wildeslam.
 * @create 2023/11/27 19:36
 */
@Slf4j
public class AsyncCompareCaseTaskRunnable extends AbstractContextWithTraceRunnable {

  private final ReplayResultComparer replayResultComparer;

  private final ReplayActionCaseItem caseItem;

  AsyncCompareCaseTaskRunnable(
      ReplayResultComparer replayResultComparer,
      ReplayActionCaseItem caseItem) {
    this.replayResultComparer = replayResultComparer;
    this.caseItem = caseItem;
  }

  @Override
  protected void doWithContextRunning() {
    boolean compareSuccess = replayResultComparer.compare(caseItem, true);
    if (!compareSuccess) {
      LOGGER.error("Comparer returned false, retry, case id: {}", caseItem.getId());
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy