wernerdv commented on code in PR #12840:
URL: https://github.com/apache/ignite/pull/12840#discussion_r2882762991
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/IgniteCacheDumpSelf2Test.java:
##########
@@ -1219,6 +1220,190 @@ public void testReadEncrypted() throws Exception {
IntStream.range(0, KEYS_CNT).forEach(i -> assertEquals((Integer)i,
dumpEntries.get(i)));
}
+ /** */
+ @Test
+ public void testDumpReaderDebugLogsGroupName() throws Exception {
+ String id = "test";
+ setLoggerDebugLevel();
+ ListeningTestLogger testLog = new ListeningTestLogger(log);
+
+ LogListener errLsnr = LogListener.matches("Error consuming partition")
+ .andMatches("grpName=" + GRP)
+ .build();
+ LogListener cnsmLsnr = LogListener.matches("Consuming partition")
+ .andMatches("grpName=" + GRP)
+ .build();
+ testLog.registerListener(errLsnr);
+ testLog.registerListener(cnsmLsnr);
+
+ try {
+ IgniteEx ign0 = startGrid(getConfiguration(id)
+ .setConsistentId(id)
+ .setGridLogger(testLog));
+
+ ign0.cluster().state(ClusterState.ACTIVE);
+
+ IgniteCache<Integer, Integer> cache = ign0.createCache(new
CacheConfiguration<Integer, Integer>()
+ .setName(CACHE_0)
+ .setGroupName(GRP)
+ .setBackups(1)
+ .setAffinity(new RendezvousAffinityFunction().setPartitions(3))
+ );
+
+ IntStream.range(0, KEYS_CNT).forEach(i -> cache.put(i, i));
+
+ ign0.snapshot().createDump(DMP_NAME, null).get(getTestTimeout());
+
+ TestDumpConsumer cnsmr = new TestDumpConsumer() {
+ @Override public void onPartition(int grp, int part,
Iterator<DumpEntry> data) {
+ throw new RuntimeException("trigger error log");
+ }
+ };
+
+ try {
+ new DumpReader(
+ new DumpReaderConfiguration(
+ DMP_NAME,
+ null,
+ ign0.configuration(),
+ cnsmr,
+ DFLT_THREAD_CNT,
+ DFLT_TIMEOUT,
+ true,
+ true,
+ false,
+ new String[]{GRP},
+ null,
+ false,
+ null
+ ),
+ testLog
+ ).run();
+ fail("Expected IgniteException");
Review Comment:
Add empty line above.
--
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]