File tree 1 file changed +10
-4
lines changed
flink-datastream/src/test/java/org/apache/flink/datastream/impl
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,11 @@ void testFromSource() {
93
93
Collection <StreamNode > nodes = streamGraph .getStreamNodes ();
94
94
assertThat (nodes ).hasSize (2 );
95
95
Collection <Integer > sourceIDs = streamGraph .getSourceIDs ();
96
- StreamNode sourceNode = nodes .iterator ().next ();
97
- assertThat (sourceIDs ).containsExactly (sourceNode .getId ());
96
+ for (StreamNode node : nodes ) {
97
+ if (node .getOperatorName ().contains ("source" )) {
98
+ assertThat (sourceIDs ).containsExactly (node .getId ());
99
+ }
100
+ }
98
101
}
99
102
100
103
@ Test
@@ -118,7 +121,10 @@ public void processRecord(
118
121
StreamGraph streamGraph = StreamTestUtils .getStreamGraph (env );
119
122
Collection <StreamNode > nodes = streamGraph .getStreamNodes ();
120
123
Collection <Integer > sourceIDs = streamGraph .getSourceIDs ();
121
- StreamNode sourceNode = nodes .iterator ().next ();
122
- assertThat (sourceIDs ).containsExactly (sourceNode .getId ());
124
+ for (StreamNode node : nodes ) {
125
+ if (node .getOperatorName ().contains ("source" )) {
126
+ assertThat (sourceIDs ).containsExactly (node .getId ());
127
+ }
128
+ }
123
129
}
124
130
}
You can’t perform that action at this time.
0 commit comments