wardlican commented on a change in pull request #2685:
URL: https://github.com/apache/incubator-inlong/pull/2685#discussion_r813874430
##########
File path:
inlong-sdk/sort-sdk/src/test/java/org/apache/inlong/sdk/sort/impl/InLongPulsarFetcherImplTest.java
##########
@@ -42,42 +43,51 @@
import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
+import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
@PowerMockIgnore("javax.management.*")
@RunWith(PowerMockRunner.class)
+@PrepareForTest({ClientContext.class})
public class InLongPulsarFetcherImplTest {
private ClientContext clientContext;
- private SortClientConfig sortClientConfig;
private InLongTopic inLongTopic;
+ private SortClientConfig sortClientConfig;
private StatManager statManager;
- private SortClientStateCounter sortClientStateCounter;
/**
* setUp
*/
@Before
public void setUp() throws Exception {
+ System.setProperty("log4j2.disable.jmx", Boolean.TRUE.toString());
+
inLongTopic = new InLongTopic();
inLongTopic.setTopic("testTopic");
inLongTopic.setPartitionId(0);
inLongTopic.setTopicType("pulsar");
CacheZoneCluster cacheZoneCluster = new CacheZoneCluster("clusterId",
"bootstraps", "token");
inLongTopic.setInLongCluster(cacheZoneCluster);
- clientContext = PowerMockito.mock(ClientContext.class);
+ try {
+ clientContext = PowerMockito.mock(ClientContext.class);
+ } catch (Exception e) {
+ e.printStackTrace();
Review comment:
ok I will fix it in next version
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]