Skip to content

Commit b2a2cc0

Browse files
committed
GH-1352: Fix Test Container
1 parent 7b9be95 commit b2a2cc0

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/AbstractMessageListenerContainer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ protected void checkMessageListener(Object listener) {
457457
/**
458458
* @return The message listener object to register.
459459
*/
460+
@Override
460461
public Object getMessageListener() {
461462
return this.messageListener;
462463
}
@@ -557,6 +558,7 @@ public boolean removeAfterReceivePostProcessor(MessagePostProcessor afterReceive
557558
*
558559
* @param autoStartup true for auto startup.
559560
*/
561+
@Override
560562
public void setAutoStartup(boolean autoStartup) {
561563
this.autoStartup = autoStartup;
562564
}

spring-rabbit/src/test/java/org/springframework/amqp/rabbit/config/MessageListenerTestContainer.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
2121
import org.springframework.amqp.rabbit.listener.RabbitListenerEndpoint;
2222
import org.springframework.beans.factory.DisposableBean;
2323
import org.springframework.beans.factory.InitializingBean;
24+
import org.springframework.lang.Nullable;
2425

2526
/**
2627
* @author Stephane Nicoll
@@ -47,6 +48,16 @@ public RabbitListenerEndpoint getEndpoint() {
4748
return endpoint;
4849
}
4950

51+
@Override
52+
public void setAutoStartup(boolean autoStart) {
53+
}
54+
55+
@Override
56+
@Nullable
57+
public Object getMessageListener() {
58+
return null;
59+
}
60+
5061
public boolean isStarted() {
5162
return startInvoked && initializationInvoked;
5263
}

0 commit comments

Comments
 (0)