Fixing test issues

This commit is contained in:
Soby Chacko
2021-06-07 17:59:24 -04:00
parent 55cb899715
commit 3b9b23304c
4 changed files with 6 additions and 9 deletions

View File

@@ -30,7 +30,6 @@ import org.apache.geode.cache.Region;
import org.apache.geode.pdx.PdxInstance;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
@@ -48,7 +47,6 @@ import org.springframework.messaging.Message;
import static org.assertj.core.api.Assertions.assertThat;
@Tag("integration")
@Disabled
public class GeodeSourceTests {
private static ApplicationContextRunner applicationContextRunner;
@@ -93,7 +91,7 @@ public class GeodeSourceTests {
List<String> values = new ArrayList();
for (int i = 0; i < 3; i++) {
Message<byte[]> message = outputDestination.receive(Duration.ofSeconds(3).toMillis());
Message<byte[]> message = outputDestination.receive(Duration.ofSeconds(3).toMillis(), "geodeSupplier-out-0");
assertThat(message).isNotNull();
values.add(new String(message.getPayload()));
}
@@ -122,7 +120,7 @@ public class GeodeSourceTests {
putStockEvent(region, new Stock("YYY", 110.01));
putStockEvent(region, new Stock("XXX", 139.80));
Message<byte[]> message = outputDestination.receive(Duration.ofSeconds(3).toMillis());
Message<byte[]> message = outputDestination.receive(Duration.ofSeconds(3).toMillis(), "geodeSupplier-out-0");
assertThat(message).isNotNull();
Stock result = objectMapper.readValue(message.getPayload(), Stock.class);
assertThat(result).isEqualTo(new Stock("XXX", 140.20));

View File

@@ -69,7 +69,7 @@ public class MqttSourceTests {
mqttOutbound.handleMessage(MessageBuilder.withPayload("hello").build());
OutputDestination target = context.getBean(OutputDestination.class);
Message<byte[]> sourceMessage = target.receive(10000);
Message<byte[]> sourceMessage = target.receive(10000, "mqttSupplier-out-0");
final String actual = new String(sourceMessage.getPayload());
assertThat(actual).isEqualTo("hello");

View File

@@ -86,7 +86,7 @@ public class RabbitSourceListenerTests {
rabbitTemplate.convertAndSend("scsapp-testex", "", "hello");
OutputDestination target = context.getBean(OutputDestination.class);
Message<byte[]> sourceMessage = target.receive(600000);
Message<byte[]> sourceMessage = target.receive(600000, "rabbitSupplier-out-0");
final String actual = new String(sourceMessage.getPayload());
assertThat(actual).isEqualTo("hello");
@@ -114,7 +114,7 @@ public class RabbitSourceListenerTests {
bootFactory.resetConnection();
OutputDestination target = context.getBean(OutputDestination.class);
Message<byte[]> sourceMessage = target.receive(600000);
Message<byte[]> sourceMessage = target.receive(600000, "rabbitSupplier-out-0");
final String actual = new String(sourceMessage.getPayload());
assertThat(actual).isEqualTo("foo");
@@ -170,7 +170,7 @@ public class RabbitSourceListenerTests {
});
OutputDestination target = context.getBean(OutputDestination.class);
Message<byte[]> sourceMessage = target.receive(600000);
Message<byte[]> sourceMessage = target.receive(600000, "rabbitSupplier-out-0");
final String actual = new String(sourceMessage.getPayload());
assertThat(actual).isEqualTo("foo");

View File

@@ -21,7 +21,6 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.WebApplicationType;