Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
chillleader committed Sep 20, 2024
1 parent c7cd4cc commit b204f8d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class RabbitMqExecutableLifecycleTest extends InboundBaseTest {
RabbitMqInboundProperties properties;

ConnectionFactorySupplier connectionFactorySupplier;
Connection connection;
Channel channel;

@BeforeEach
Expand All @@ -49,12 +48,12 @@ void init()
channel = mock(Channel.class);
connectionFactorySupplier = mock(ConnectionFactorySupplier.class);
ConnectionFactory connectionFactoryMock = mock(ConnectionFactory.class);
connection = mock(Connection.class);
Connection connectionMock = mock(Connection.class);

when(connectionFactorySupplier.createFactory(any(), any())).thenReturn(connectionFactoryMock);

when(connectionFactoryMock.newConnection()).thenReturn(connection);
when(connection.createChannel()).thenReturn(channel);
when(connectionFactoryMock.newConnection()).thenReturn(connectionMock);
when(connectionMock.createChannel()).thenReturn(channel);

properties = new RabbitMqInboundProperties();
properties.setQueueName(SecretsConstant.SECRETS + SecretsConstant.QUEUE_NAME);
Expand Down

0 comments on commit b204f8d

Please sign in to comment.