@@ -120,7 +120,7 @@ public void testRead150K() throws Exception {
120
120
}
121
121
122
122
@ Test
123
- public void testRead10KMultiple () throws Exception {
123
+ public void testRead10KMultipleWithContent () throws Exception {
124
124
String content = "\" colbigint\" ,\" colint\" ,\" coltext\" ,\" colfloat\" ,\" coldouble\" ,\" coldate\" ,\" coltime\" ,\" coltimestamp\" ,\" colboolean\" ,\" coluuid\" ,\" colsmallint\" ,\" coltinyint\" ,\" coltimeuuid\" ,\" colvarchar\" \n " +
125
125
"\" 0\" ,\" 1064\" ,\" zeVOKGnORq\" ,\" 627.6811\" ,\" 395.8522407512559\" ,\" 1971-11-12\" ,\" 03:37:15\" ,\" 2000-09-25T22:18:45Z\" ,\" false\" ,\" 6080071f-4dd1-4ea5-b711-9ad0716e242a\" ,\" 8966\" ,\" 55\" ,\" f45e58f5-c3b7-11ef-8d19-97ae87be7c54\" ,\" Tzxsw\" \n " +
126
126
"\" 1\" ,\" 1709\" ,\" 7By0z5QEXh\" ,\" 652.03955\" ,\" 326.9081263857284\" ,\" 2013-12-17\" ,\" 08:43:09\" ,\" 2010-04-27T07:02:27Z\" ,\" false\" ,\" 7d511666-2f81-41c4-9d5c-a5fa87f7d1c3\" ,\" 24399\" ,\" 38\" ,\" f45e8006-c3b7-11ef-8d19-172ff8d0d752\" ,\" exAbN\" \n " ;
@@ -138,7 +138,32 @@ public void testRead10KMultiple() throws Exception {
138
138
for (TestSetupRead setup : setups ) {
139
139
setup .columnNames ="colbigint, colint" ;
140
140
141
- //results = runTestParallel(setup, content, 5);
141
+ results = runTestParallel (setup , content , 5 );
142
+
143
+ // check amount of read items
144
+ for (MockFlowFile result : results ) {
145
+ assertNotNull (result , String .format ("Issue with processing in '%s'" , setup .name ));
146
+ assertEquals (10_000 , Long .parseLong (result .getAttribute (CQLAttributes .READ_COUNT )));
147
+ }
148
+ }
149
+ }
150
+
151
+ @ Test
152
+ public void testRead10KMultiple () throws Exception {
153
+ List <MockFlowFile > results ;
154
+
155
+ // Prepare data for performance test
156
+ PutCQLPerformance putCQL = new PutCQLPerformance ();
157
+ putCQL .init ();
158
+ putCQL .csvRandomWrite10K ();
159
+
160
+ // sleep before read (2 seconds)
161
+ Thread .sleep (2000 );
162
+
163
+ // Read data
164
+ for (TestSetupRead setup : setups ) {
165
+ setup .columnNames ="colbigint, colint" ;
166
+
142
167
results = runTestParallel (setup , 5 );
143
168
144
169
// check amount of read items
@@ -148,4 +173,60 @@ public void testRead10KMultiple() throws Exception {
148
173
}
149
174
}
150
175
}
176
+
177
+ @ Test
178
+ public void testRead100KMultipleWithContent () throws Exception {
179
+ String content = "\" colbigint\" ,\" colint\" ,\" coltext\" ,\" colfloat\" ,\" coldouble\" ,\" coldate\" ,\" coltime\" ,\" coltimestamp\" ,\" colboolean\" ,\" coluuid\" ,\" colsmallint\" ,\" coltinyint\" ,\" coltimeuuid\" ,\" colvarchar\" \n " +
180
+ "\" 0\" ,\" 1064\" ,\" zeVOKGnORq\" ,\" 627.6811\" ,\" 395.8522407512559\" ,\" 1971-11-12\" ,\" 03:37:15\" ,\" 2000-09-25T22:18:45Z\" ,\" false\" ,\" 6080071f-4dd1-4ea5-b711-9ad0716e242a\" ,\" 8966\" ,\" 55\" ,\" f45e58f5-c3b7-11ef-8d19-97ae87be7c54\" ,\" Tzxsw\" \n " +
181
+ "\" 1\" ,\" 1709\" ,\" 7By0z5QEXh\" ,\" 652.03955\" ,\" 326.9081263857284\" ,\" 2013-12-17\" ,\" 08:43:09\" ,\" 2010-04-27T07:02:27Z\" ,\" false\" ,\" 7d511666-2f81-41c4-9d5c-a5fa87f7d1c3\" ,\" 24399\" ,\" 38\" ,\" f45e8006-c3b7-11ef-8d19-172ff8d0d752\" ,\" exAbN\" \n " ;
182
+ List <MockFlowFile > results ;
183
+
184
+ // Prepare data for performance test
185
+ PutCQLPerformance putCQL = new PutCQLPerformance ();
186
+ putCQL .init ();
187
+ putCQL .csvRandomWrite100K ();
188
+
189
+ // sleep before read (2 seconds)
190
+ Thread .sleep (2000 );
191
+
192
+ // Read data
193
+ for (TestSetupRead setup : setups ) {
194
+ setup .columnNames ="colbigint, colint" ;
195
+
196
+ results = runTestParallel (setup , content , 5 );
197
+
198
+ // check amount of read items
199
+ for (MockFlowFile result : results ) {
200
+ assertNotNull (result , String .format ("Issue with processing in '%s'" , setup .name ));
201
+ assertEquals (100_000 , Long .parseLong (result .getAttribute (CQLAttributes .READ_COUNT )));
202
+ }
203
+ }
204
+ }
205
+
206
+ @ Test
207
+ public void testRead100KMultiple () throws Exception {
208
+ List <MockFlowFile > results ;
209
+
210
+ // Prepare data for performance test
211
+ PutCQLPerformance putCQL = new PutCQLPerformance ();
212
+ putCQL .init ();
213
+ putCQL .csvRandomWrite100K ();
214
+
215
+ // sleep before read (2 seconds)
216
+ Thread .sleep (2000 );
217
+
218
+ // Read data
219
+ for (TestSetupRead setup : setups ) {
220
+ setup .columnNames ="colbigint, colint" ;
221
+
222
+ results = runTestParallel (setup , 5 );
223
+
224
+ // check amount of read items
225
+ for (MockFlowFile result : results ) {
226
+ assertNotNull (result , String .format ("Issue with processing in '%s'" , setup .name ));
227
+ assertEquals (100_000 , Long .parseLong (result .getAttribute (CQLAttributes .READ_COUNT )));
228
+ }
229
+ }
230
+ }
231
+
151
232
}
0 commit comments