GH-1352: Fix Test Container
This commit is contained in:
@@ -457,6 +457,7 @@ public abstract class AbstractMessageListenerContainer extends RabbitAccessor
|
||||
/**
|
||||
* @return The message listener object to register.
|
||||
*/
|
||||
@Override
|
||||
public Object getMessageListener() {
|
||||
return this.messageListener;
|
||||
}
|
||||
@@ -557,6 +558,7 @@ public abstract class AbstractMessageListenerContainer extends RabbitAccessor
|
||||
*
|
||||
* @param autoStartup true for auto startup.
|
||||
*/
|
||||
@Override
|
||||
public void setAutoStartup(boolean autoStartup) {
|
||||
this.autoStartup = autoStartup;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,6 +21,7 @@ import org.springframework.amqp.rabbit.listener.MessageListenerContainer;
|
||||
import org.springframework.amqp.rabbit.listener.RabbitListenerEndpoint;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* @author Stephane Nicoll
|
||||
@@ -47,6 +48,16 @@ public class MessageListenerTestContainer
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAutoStartup(boolean autoStart) {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getMessageListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isStarted() {
|
||||
return startInvoked && initializationInvoked;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user