Migrate transport-native-unix-common tests to JUnit 5 (#11321)
Motivation: JUnit 5 is more expressive, extensible, and composable in many ways, and it's better able to run tests in parallel. Modifications: Use JUnit5 in tests Result: Related to https://github.com/netty/netty/issues/10757
This commit is contained in:
parent
bc7434aedb
commit
2ea670021b
@ -21,16 +21,16 @@ import io.netty.buffer.ByteBufAllocator;
|
||||
import io.netty.buffer.CompositeByteBuf;
|
||||
import io.netty.buffer.PooledByteBufAllocator;
|
||||
import io.netty.buffer.UnpooledByteBufAllocator;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static io.netty.channel.unix.UnixChannelUtil.isBufferCopyNeededForWrite;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class UnixChannelUtilTest {
|
||||
|
||||
@ -82,7 +82,7 @@ public class UnixChannelUtilTest {
|
||||
comp.addComponent(byteBuf);
|
||||
}
|
||||
|
||||
assertEquals(byteBufs.toString(), expected, isBufferCopyNeededForWrite(comp, IOV_MAX));
|
||||
assertEquals(expected, isBufferCopyNeededForWrite(comp, IOV_MAX), byteBufs.toString());
|
||||
assertTrue(comp.release());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user