Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.14.1 #558

Merged
merged 8 commits into from
Feb 29, 2024
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Release History

### 1.14.1 (2024-02-29)
#### Key Bug Fixes
* Fixed `NullPointerException` in `CosmosDBSourceConnector`. [PR 555](https://github.com/microsoft/kafka-connect-cosmosdb/pull/555)

### 1.14.0 (2024-02-28)
#### New Features
* Updated `azure-cosmos` version to 4.56.0.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

<groupId>com.azure.cosmos.kafka</groupId>
<artifactId>kafka-connect-cosmos</artifactId>
<version>1.14.0</version>
<version>1.14.1</version>

<name> kafka-connect-cosmos</name>
<url>https://github.com/microsoft/kafka-connect-cosmosdb</url>
Original file line number Diff line number Diff line change
@@ -63,8 +63,9 @@ public String version() {

@Override
public void start(Map<String, String> map) {
logger.info("Worker {} Starting CosmosDBSourceTask.", this.config.getWorkerName());
config = new CosmosDBSourceConfig(map);
logger.info("Starting CosmosDBSourceTask.");
config = new CosmosDBSourceConfig(map);

this.queue = new LinkedTransferQueue<>();

logger.info("Worker {} Creating the client.", this.config.getWorkerName());
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
import static org.mockito.Mockito.when;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -31,6 +32,8 @@
import org.mockito.Mockito;

public class CosmosDBSourceTaskTest {
private final static String COSMOS_EMULATOR_KEY = "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==";
private final static String COSMOS_EMULATOR_HOST = "https://localhost:8081/";
private CosmosDBSourceTask testTask;
private final String topicName = "testtopic";
private final String containerName = "container666";
@@ -96,6 +99,17 @@ public void setup() throws IllegalAccessException {

}

@Test(expected = IllegalArgumentException.class)
public void start() {
CosmosDBSourceTask testTask = new CosmosDBSourceTask();
HashMap<String, String> configs = new HashMap<>();
configs.put(CosmosDBSourceConfig.COSMOS_CONN_ENDPOINT_CONF, COSMOS_EMULATOR_HOST);
configs.put(CosmosDBSourceConfig.COSMOS_CONN_KEY_CONF, COSMOS_EMULATOR_KEY);
configs.put(CosmosDBSourceConfig.COSMOS_DATABASE_NAME_CONF, "mydb");
configs.put(CosmosDBSourceConfig.COSMOS_CONTAINER_TOPIC_MAP_CONF, "mytopic5#mycontainer6");
testTask.start(sourceSettings);
}

@Test
public void testHandleChanges() throws JsonProcessingException, IllegalAccessException, InterruptedException {
String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}";