Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ndimiduk committed Dec 22, 2021
1 parent 4fb50fc commit c39630d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ private <T> CompletableFuture<T> tracedLocationFuture(
}

private static List<String> getRegionNames(RegionLocations locs) {
if (locs == null) {
return Collections.emptyList();
}
if (locs.getRegionLocations() == null) {
if (locs == null || locs.getRegionLocations() == null) {
return Collections.emptyList();
}
return Arrays.stream(locs.getRegionLocations())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hbase.thirdparty.com.google.common.io.Closeables;

@Category({ ClientTests.class, MediumTests.class })
public class TestAsyncRegionLocatorTracing {
private static final Logger LOG = LoggerFactory.getLogger(TestAsyncRegionLocatorTracing.class);

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
Expand Down Expand Up @@ -112,7 +115,9 @@ private SpanData waitSpan(Matcher<SpanData> matcher) {
"waiting for span",
() -> traceRule.getSpans(), hasItem(spanLocator)));
} catch (AssertionError e) {
traceRule.getSpans().forEach(System.err::println);
LOG.error("AssertionError while waiting for matching span. Span reservoir contains: {}",
traceRule.getSpans());
throw e;
}
return traceRule.getSpans()
.stream()
Expand Down

0 comments on commit c39630d

Please sign in to comment.