Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Mattingly committed Sep 14, 2023
1 parent 6711c9a commit f139824
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ public void consumeEventFromDisruptor(NamedQueuePayload namedQueuePayload) {

private static Collection<HBaseProtos.NameBytesPair>
buildNameBytesPairs(Map<String, byte[]> attributes) {
if (attributes == null) {
return Collections.emptySet();
}
return attributes.entrySet().stream().map(attr -> HBaseProtos.NameBytesPair.newBuilder()
.setName(attr.getKey()).setValue(ByteString.copyFrom(attr.getValue())).build())
.collect(Collectors.toSet());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,20 +756,19 @@ public long getSize() {

@Override
public RPCProtos.RequestHeader getHeader() {
RPCProtos.RequestHeader.Builder builder = RPCProtos.RequestHeader.newBuilder();
REQUEST_HEADERS.forEach(builder::addAttribute);
return builder.build();
return null;
}

@Override
public Map<String, byte[]> getConnectionAttributes() {
return CONNECTION_HEADERS.stream().collect(Collectors.toMap(
nameBytesPair -> nameBytesPair.getName(), nameBytesPair -> nameBytesPair.toByteArray()));
return CONNECTION_HEADERS.stream().collect(Collectors
.toMap(HBaseProtos.NameBytesPair::getName, pair -> pair.getValue().toByteArray()));
}

@Override
public Map<String, byte[]> getRequestAttributes() {
return null;
return REQUEST_HEADERS.stream().collect(Collectors.toMap(HBaseProtos.NameBytesPair::getName,
pair -> pair.getValue().toByteArray()));
}

@Override
Expand Down

0 comments on commit f139824

Please sign in to comment.