Fix unit test error in ci
This commit is contained in:
parent
cf607a47cd
commit
7ad96444c8
@ -25,6 +25,8 @@ import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@ -48,8 +50,9 @@ public class NacosExecuteTaskExecuteEngineTest {
|
||||
private AbstractExecuteTask task;
|
||||
|
||||
@Test
|
||||
public void testAddTask() {
|
||||
public void testAddTask() throws InterruptedException {
|
||||
executeTaskExecuteEngine.addTask("test", task);
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
verify(task).run();
|
||||
assertTrue(executeTaskExecuteEngine.isEmpty());
|
||||
assertEquals(0, executeTaskExecuteEngine.size());
|
||||
|
@ -42,7 +42,7 @@ public class HessianSerializer implements Serializer {
|
||||
|
||||
@Override
|
||||
public <T> T deserialize(byte[] data) {
|
||||
return deserialize(data);
|
||||
return deseiralize0(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -55,7 +55,7 @@ public class HessianSerializer implements Serializer {
|
||||
return deserialize(data);
|
||||
}
|
||||
|
||||
private <T> T deseiralize(byte[] data) {
|
||||
private <T> T deseiralize0(byte[] data) {
|
||||
if (ByteUtils.isEmpty(data)) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user