Browse Source

[fix] UT error

3.0.3-release
Jay Chung 2 years ago
parent
commit
fa5d67804e
  1. 5
      dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/CommandMapperTest.java

5
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/CommandMapperTest.java

@ -45,6 +45,7 @@ import java.util.List;
import java.util.Map;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.springframework.beans.factory.annotation.Autowired;
/**
@ -187,10 +188,10 @@ public class CommandMapperTest extends BaseDaoTest {
boolean hit = id % masterCount == thisMasterSlot;
List<Command> commandList = commandMapper.queryCommandPageBySlot(1, 0, masterCount, thisMasterSlot);
if (hit) {
assertEquals(id,commandList.get(0).getId());
Assertions.assertEquals(id, commandList.get(0).getId());
} else {
commandList.forEach(o -> {
assertNotEquals(id, o.getId());
Assertions.assertNotEquals(id, o.getId());
assertEquals(thisMasterSlot, o.getId() % masterCount);
});
}

Loading…
Cancel
Save