@@ -116,7 +116,7 @@ protected List<MockFlowFile> runTestParallelWithProperty(TestSetupRead setup, St
116
116
testRunner .enableControllerService (testService );
117
117
if (parallel >1 )
118
118
testRunner .setThreadCount (parallel );
119
- results = coreTestParallel (setup , content , validate );
119
+ results = coreTestParallel (setup , content , validate , parallel );
120
120
testRunner .disableControllerService (testService );
121
121
return results ;
122
122
}
@@ -135,32 +135,22 @@ private void printResult(MockFlowFile result, TestSetupRead setup, long start, l
135
135
System .lineSeparator ());
136
136
}
137
137
138
- private List <MockFlowFile > coreTestParallel (TestSetupRead setup , String content , boolean validate ) throws Exception {
138
+ private List <MockFlowFile > coreTestParallel (TestSetupRead setup , String content , boolean validate , int parallel ) throws Exception {
139
139
try {
140
140
long finish , start , countWrite ;
141
141
List <MockFlowFile > results ;
142
142
boolean ok ;
143
143
144
144
start = System .currentTimeMillis ();
145
- testRunner .run (2 );
145
+ testRunner .run (parallel );
146
146
if (!testRunner .getFlowFilesForRelationship (PutCQL .REL_SUCCESS ).isEmpty ()) {
147
147
results = testRunner .getFlowFilesForRelationship (PutCQL .REL_SUCCESS );
148
148
ok = testRunner .getFlowFilesForRelationship (PutCQL .REL_FAILURE ).isEmpty ();
149
149
finish = System .currentTimeMillis ();
150
150
151
151
if (ok ) {
152
- for (MockFlowFile result : results ) {
152
+ for (MockFlowFile result : results )
153
153
printResult (result , setup , start , finish );
154
- // countWrite = Long.parseLong(result.getAttribute(CQLAttributes.READ_COUNT));
155
- // System.out.printf("Source: '%s'; READ; '%s': %s (%d ms); Items: %d; Perf: %.1f [calls/sec]%s",
156
- // setup.name,
157
- // "FlowFile",
158
- // ReadableValue.fromMillisecond(finish - start),
159
- // finish - start,
160
- // countWrite,
161
- // countWrite / ((finish - start) / 1000.0),
162
- // System.lineSeparator());
163
- }
164
154
return results ;
165
155
}
166
156
}
@@ -186,15 +176,6 @@ private MockFlowFile coreTest(TestSetupRead setup, String content, boolean valid
186
176
187
177
if (ok ) {
188
178
printResult (result , setup , start , finish );
189
- // countWrite = Long.parseLong(result.getAttribute(CQLAttributes.READ_COUNT));
190
- // System.out.printf("Source: '%s'; READ; '%s': %s (%d ms); Items: %d; Perf: %.1f [calls/sec]%s",
191
- // setup.name,
192
- // "FlowFile",
193
- // ReadableValue.fromMillisecond(finish - start),
194
- // finish - start,
195
- // countWrite,
196
- // countWrite / ((finish - start) / 1000.0),
197
- // System.lineSeparator());
198
179
return result ;
199
180
}
200
181
}
0 commit comments