| 24 | import org.apache.pulsar.io.core.SinkContext; |
| 25 | |
| 26 | public class SinkForTest<T> implements Sink<String> { |
| 27 | @Override |
| 28 | public void open(Map<String, Object> config, SinkContext sinkContext) throws Exception { |
| 29 | |
| 30 | } |
| 31 | |
| 32 | @Override |
| 33 | public void write(Record<String> record) throws Exception { |
| 34 | if (record.getValue().contains("fail")) { |
| 35 | record.fail(); |
| 36 | } else { |
| 37 | record.ack(); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | @Override |
| 42 | public void close() throws Exception { |
| 43 | |
| 44 | } |
| 45 | } |
nothing calls this directly
no outgoing calls
no test coverage detected