You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/04/13 03:44:19 UTC
[shardingsphere] branch master updated: Revert "Fix PacketCodecTest exception (#16781)" (#16785)
This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new a14f1deddc2 Revert "Fix PacketCodecTest exception (#16781)" (#16785)
a14f1deddc2 is described below
commit a14f1deddc21ca6c24a12c49f0e5947bf5aff914
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Wed Apr 13 11:44:11 2022 +0800
Revert "Fix PacketCodecTest exception (#16781)" (#16785)
This reverts commit 92dec8573aa494df8f865fc608b1f9ac4291ba04.
---
.../org/apache/shardingsphere/db/protocol/codec/PacketCodecTest.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/test/java/org/apache/shardingsphere/db/protocol/codec/PacketCodecTest.java b/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/test/java/org/apache/shardingsphere/db/protocol/codec/PacketCodecTest.java
index 4ce5d983038..0b1eb344c4c 100644
--- a/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/test/java/org/apache/shardingsphere/db/protocol/codec/PacketCodecTest.java
+++ b/shardingsphere-db-protocol/shardingsphere-db-protocol-core/src/test/java/org/apache/shardingsphere/db/protocol/codec/PacketCodecTest.java
@@ -23,7 +23,6 @@ import org.apache.shardingsphere.db.protocol.packet.DatabasePacket;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.Answers;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
@@ -40,7 +39,7 @@ public final class PacketCodecTest {
@Mock
private DatabasePacketCodecEngine databasePacketCodecEngine;
- @Mock(answer = Answers.RETURNS_DEEP_STUBS)
+ @Mock
private ChannelHandlerContext context;
@Mock
@@ -56,7 +55,6 @@ public final class PacketCodecTest {
@Test
public void assertDecodeWithValidHeader() {
when(byteBuf.readableBytes()).thenReturn(1);
- when(byteBuf.capacity()).thenReturn(1);
when(databasePacketCodecEngine.isValidHeader(1)).thenReturn(true);
packetCodec.decode(context, byteBuf, Collections.emptyList());
verify(databasePacketCodecEngine).decode(context, byteBuf, Collections.emptyList());