Skip to content

Commit

Permalink
JavaInstanceTest should be AssertEquals (#12836)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4a4c1de)
  • Loading branch information
shoothzj authored and codelipenghui committed Dec 21, 2021
1 parent 012e1b1 commit 28dcdc3
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -34,6 +34,7 @@
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
Expand Down Expand Up @@ -226,7 +227,7 @@ public void testAsyncFunctionMaxPending() throws Exception {

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();
Expand All @@ -235,7 +236,6 @@ public void testAsyncFunctionMaxPending() throws Exception {
instance.close();
}

@SuppressWarnings("serial")
private static class UserException extends Exception {
public UserException(String msg) {
super(msg);
Expand Down

0 comments on commit 28dcdc3

Please sign in to comment.