JavaInstanceTest should be AssertEquals
@@ -34,6 +34,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.functions.api.Function;
import org.apache.pulsar.functions.api.Record;
import org.apache.pulsar.functions.instance.JavaInstance.AsyncFuncRequest;
+import org.testng.Assert;
import org.testng.annotations.Test;
@Slf4j
@@ -226,7 +227,7 @@ public class JavaInstanceTest {
for (int i = 0; i < 3; i++) {
AsyncFuncRequest request = instance.getPendingAsyncRequests().poll();
- assertNotNull(testString + "-lambda", (String) request.getProcessResult().get());
+ Assert.assertEquals(request.getProcessResult().get(), testString + "-lambda");
}
long endTime = System.currentTimeMillis();
@@ -235,7 +236,6 @@ public class JavaInstanceTest {
instance.close();
}
- @SuppressWarnings("serial")
private static class UserException extends Exception {
public UserException(String msg) {
super(msg);
