use of org.apache.kafka.connect.runtime.TaskStatus in project kafka by apache.
the class MemoryStatusBackingStoreTest method deleteTaskStatus.
@Test
public void deleteTaskStatus() {
MemoryStatusBackingStore store = new MemoryStatusBackingStore();
ConnectorTaskId taskId = new ConnectorTaskId("connector", 0);
store.put(new TaskStatus(taskId, ConnectorStatus.State.RUNNING, "localhost:8083", 0));
store.put(new TaskStatus(taskId, ConnectorStatus.State.DESTROYED, "localhost:8083", 0));
assertNull(store.get(taskId));
}
use of org.apache.kafka.connect.runtime.TaskStatus in project kafka by apache.
the class MemoryStatusBackingStoreTest method putAndGetTaskStatus.
@Test
public void putAndGetTaskStatus() {
MemoryStatusBackingStore store = new MemoryStatusBackingStore();
ConnectorTaskId taskId = new ConnectorTaskId("connector", 0);
TaskStatus status = new TaskStatus(taskId, ConnectorStatus.State.RUNNING, "localhost:8083", 0);
store.put(status);
assertEquals(status, store.get(taskId));
assertEquals(Collections.singleton(status), store.getAll("connector"));
}
Aggregations