Bug fixes to testing architecture

This commit is contained in:
Meher Mankikar 2023-06-14 14:18:01 -07:00
parent 37f6c042f4
commit 67ebab7c9f
2 changed files with 14 additions and 6 deletions

View file

@ -140,11 +140,8 @@ public interface KCLAppConfig {
}
default ConfigsBuilder getConfigsBuilder() throws IOException, URISyntaxException {
return getConfigsBuilder("");
}
default ConfigsBuilder getConfigsBuilder(String workerIdSuffix) throws IOException, URISyntaxException {
final String workerId = getWorkerId() + workerIdSuffix;
// return getConfigsBuilder("");
final String workerId = getWorkerId();
if (getStreamArn() == null) {
return new ConfigsBuilder(getStreamName(), getApplicationName(), buildConsumerClient(), buildAsyncDynamoDbClient(),
buildAsyncCloudWatchClient(), workerId, getShardRecordProcessorFactory());
@ -154,6 +151,17 @@ public interface KCLAppConfig {
}
}
// default ConfigsBuilder getConfigsBuilder(String workerIdSuffix) throws IOException, URISyntaxException {
// final String workerId = getWorkerId() + workerIdSuffix;
// if (getStreamArn() == null) {
// return new ConfigsBuilder(getStreamName(), getApplicationName(), buildConsumerClient(), buildAsyncDynamoDbClient(),
// buildAsyncCloudWatchClient(), workerId, getShardRecordProcessorFactory());
// } else {
// return new ConfigsBuilder(Arn.fromString(getStreamArn()), getApplicationName(), buildConsumerClient(), buildAsyncDynamoDbClient(),
// buildAsyncCloudWatchClient(), workerId, getShardRecordProcessorFactory());
// }
// }
RetrievalConfig getRetrievalConfig() throws IOException, URISyntaxException;
/**

View file

@ -124,7 +124,7 @@ public class TestConsumer {
* Stops sending dummy data.
*/
log.info("Cancelling producer and shutting down executor.");
producerFuture.cancel(true);
producerFuture.cancel(false);
producerExecutor.shutdownNow();
/**