Skip to content

Commit

Permalink
update IT infra
Browse files Browse the repository at this point in the history
  • Loading branch information
Nephery committed Nov 19, 2024
1 parent a68a3b6 commit 4717e4c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public Object resolveParameter(ParameterContext parameterContext, ExtensionConte
LOGGER.info("Creating {}", SpringCloudStreamContext.class.getSimpleName());
SpringCloudStreamContext context = new SpringCloudStreamContext(
PubSubPlusExtension.getJCSMPSession(extensionContext),
PubSubPlusExtension.getJCSMPProperties(extensionContext),
PubSubPlusExtension.getSempV2Api(extensionContext));
context.before();
return context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.solace.spring.cloud.stream.binder.properties.SolaceProducerProperties;
import com.solace.spring.cloud.stream.binder.test.util.SolaceTestBinder;
import com.solace.test.integration.semp.v2.SempV2Api;
import com.solacesystems.jcsmp.JCSMPProperties;
import com.solacesystems.jcsmp.JCSMPSession;
import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.extension.ExtensionContext;
Expand Down Expand Up @@ -35,10 +36,12 @@ public class SpringCloudStreamContext extends PartitionCapableBinderTests<Solace
implements ExtensionContext.Store.CloseableResource {
private static final Logger LOGGER = LoggerFactory.getLogger(SpringCloudStreamContext.class);
private JCSMPSession jcsmpSession;
private JCSMPProperties jcsmpProperties;
private SempV2Api sempV2Api;

public SpringCloudStreamContext(JCSMPSession jcsmpSession, SempV2Api sempV2Api) {
public SpringCloudStreamContext(JCSMPSession jcsmpSession, JCSMPProperties jcsmpProperties, SempV2Api sempV2Api) {
this.jcsmpSession = Objects.requireNonNull(jcsmpSession);
this.jcsmpProperties = Objects.requireNonNull(jcsmpProperties);
this.sempV2Api = sempV2Api;
}

Expand Down Expand Up @@ -67,7 +70,7 @@ public SolaceTestBinder getBinder() {
throw new IllegalStateException("JCSMPSession cannot be null or closed");
}
logger.info("Creating new test binder");
testBinder = new SolaceTestBinder(jcsmpSession, sempV2Api);
testBinder = new SolaceTestBinder(jcsmpSession, jcsmpProperties, sempV2Api);
}
return testBinder;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public class SolaceTestBinder
private final Map<String, String> bindingNameToErrorQueueName = new HashMap<>();
private static final Logger LOGGER = LoggerFactory.getLogger(SolaceTestBinder.class);

public SolaceTestBinder(JCSMPSession jcsmpSession, SempV2Api sempV2Api) {
public SolaceTestBinder(JCSMPSession jcsmpSession, JCSMPProperties jcsmpProperties, SempV2Api sempV2Api) {
this.applicationContext = new AnnotationConfigApplicationContext(Config.class);
this.jcsmpSession = jcsmpSession;
this.sempV2Api = sempV2Api;
SolaceMessageChannelBinder binder = new SolaceMessageChannelBinder(jcsmpSession, new SolaceEndpointProvisioner(jcsmpSession));
SolaceMessageChannelBinder binder = new SolaceMessageChannelBinder(jcsmpSession, jcsmpProperties, new SolaceEndpointProvisioner(jcsmpSession));
binder.setApplicationContext(this.applicationContext);
this.setPollableConsumerBinder(binder);
}
Expand Down

0 comments on commit 4717e4c

Please sign in to comment.