Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
askwang committed Oct 10, 2024
1 parent b31f25d commit 54104c1
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down Expand Up @@ -89,11 +91,12 @@ void testTagsTable() throws Exception {
}

private List<InternalRow> getExpectedResult() {
List<InternalRow> internalRows = new ArrayList<>();
Map<String, InternalRow> tagToRows = new TreeMap<>();
for (Pair<Tag, String> snapshot : tagManager.tagObjects()) {
Tag tag = snapshot.getKey();
String tagName = snapshot.getValue();
internalRows.add(
tagToRows.put(
tagName,
GenericRow.of(
BinaryString.fromString(tagName),
tag.id(),
Expand All @@ -109,6 +112,11 @@ private List<InternalRow> getExpectedResult() {
: BinaryString.fromString(
tag.getTagTimeRetained().toString())));
}

List<InternalRow> internalRows = new ArrayList<>();
for (Map.Entry<String, InternalRow> entry : tagToRows.entrySet()) {
internalRows.add(entry.getValue());
}
return internalRows;
}
}

0 comments on commit 54104c1

Please sign in to comment.