GH-1352: Fix Test Container

This commit is contained in:
Gary Russell
2021-06-23 15:01:29 -04:00
parent 7b9be95310
commit b2a2cc0d06
2 changed files with 14 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -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;
}