Skip to content

Commit

Permalink
Fix ISM-expecting tests by explicilty requisting random access. (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb authored May 1, 2024
1 parent dc5841d commit d2db322
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,9 @@ public void testToList() throws Exception {
Pipeline pipeline = Pipeline.create(options);

final PCollectionView<List<Integer>> view =
pipeline.apply("CreateSideInput", Create.of(11, 13, 17, 23)).apply(View.asList());
pipeline
.apply("CreateSideInput", Create.of(11, 13, 17, 23))
.apply(View.<Integer>asList().withRandomAccess());

pipeline
.apply("CreateMainInput", Create.of(29, 31))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ public void testList() throws Exception {
KV.of(2L, valueInGlobalWindow(62L)));

final PCollectionView<List<Long>> view =
Pipeline.create().apply(Create.empty(VarLongCoder.of())).apply(View.asList());
Pipeline.create()
.apply(Create.empty(VarLongCoder.of()))
.apply(View.<Long>asList().withRandomAccess());

Source sourceA = initInputFile(fromKvsForList(firstElements), ismCoder);
Source sourceB = initInputFile(fromKvsForList(secondElements), ismCoder);
Expand Down Expand Up @@ -736,7 +738,7 @@ public void testListInWindow() throws Exception {
Pipeline.create()
.apply(Create.empty(VarLongCoder.of()))
.apply(Window.into(FixedWindows.of(Duration.millis(10))))
.apply(View.asList());
.apply(View.<Long>asList().withRandomAccess());

Source sourceA = initInputFile(fromKvsForList(concat(firstElements, secondElements)), ismCoder);
Source sourceB = initInputFile(fromKvsForList(thirdElements), ismCoder);
Expand Down

0 comments on commit d2db322

Please sign in to comment.