Skip to content

Commit

Permalink
adjust based on pr
Browse files Browse the repository at this point in the history
  • Loading branch information
loserwang1024 committed May 9, 2024
1 parent 6196a59 commit 07929ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ public void translate(
}
}

/** Only visible for test */
@VisibleForTesting
protected void sinkTo(
void sinkTo(
DataStream<Event> input,
Sink<Event> sink,
String sinkName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void testPreWriteWithoutCommitSink() {
DataStreamSource<Event> inputStream = env.fromCollection(mockEvents);
DataSinkTranslator translator = new DataSinkTranslator();

// Node hash must be a 32 character String that describes a hex code
String uid = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
MockPreWriteWithoutCommitSink mockPreWriteWithoutCommitSink =
new MockPreWriteWithoutCommitSink(uid);
Expand All @@ -53,6 +54,9 @@ public void testPreWriteWithoutCommitSink() {
mockPreWriteWithoutCommitSink,
"testPreWriteWithoutCommitSink",
new OperatorID());

// Check if the `addPreWriteTopology` is called, and the uid is set when the transformation
// added
OneInputTransformation<Event, Event> oneInputTransformation =
(OneInputTransformation) env.getTransformations().get(0);
Transformation<?> reblanceTransformation = oneInputTransformation.getInputs().get(0);
Expand Down

0 comments on commit 07929ae

Please sign in to comment.