Skip to content

Commit

Permalink
Fix a couple of tests.
Browse files Browse the repository at this point in the history
* Null-containing sets don't need to be tested as they can no longer be constructed.
* Use vendered guava.
  • Loading branch information
robertwb committed Jul 8, 2024
1 parent e43e691 commit 6f15be1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ public void testStringSetEncoding() {
data = StringSetData.create(ImmutableSet.of("ab", "", "ef"));
payload = encodeStringSet(data);
assertEquals(data, decodeStringSet(payload));

// test null string encoding
data = StringSetData.create(new HashSet<>(Arrays.asList("ab", null, "cd")));
StringSetData finalData = data;
Assert.assertThrows(RuntimeException.class, () -> encodeStringSet(finalData));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;

import com.google.common.collect.Sets;
import com.google.common.collect.Sets.SetView;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Sets;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Sets.SetView;
import org.junit.Test;

public class StringSetResultTest {
Expand Down

0 comments on commit 6f15be1

Please sign in to comment.