@@ -254,12 +254,9 @@ public void insertRawData() throws Exception {
254
254
assertEquals (records .size (), 1000 );
255
255
}
256
256
257
- @ Test (groups = { "integration" }, enabled = true )
258
- public void insertRawDataSimple () throws Exception {
259
- insertRawDataSimple (1000 );
260
- }
261
- public void insertRawDataSimple (int numberOfRecords ) throws Exception {
262
- final String tableName = "raw_data_table" ;
257
+ @ Test (groups = { "integration" }, dataProvider = "insertRawDataSimpleDataProvider" , dataProviderClass = InsertTests .class )
258
+ public void insertRawDataSimple (String tableName ) throws Exception {
259
+ // final String tableName = "raw_data_table";
263
260
final String createSql = String .format ("CREATE TABLE IF NOT EXISTS %s " +
264
261
" (Id UInt32, event_ts Timestamp, name String, p1 Int64, p2 String) ENGINE = MergeTree() ORDER BY ()" , tableName );
265
262
@@ -271,6 +268,7 @@ public void insertRawDataSimple(int numberOfRecords) throws Exception {
271
268
.setInputStreamCopyBufferSize (8198 * 2 );
272
269
ByteArrayOutputStream data = new ByteArrayOutputStream ();
273
270
PrintWriter writer = new PrintWriter (data );
271
+ int numberOfRecords = 1000 ;
274
272
for (int i = 0 ; i < numberOfRecords ; i ++) {
275
273
writer .printf ("%d\t %s\t %s\t %d\t %s\n " , i , "2021-01-01 00:00:00" , "name" + i , i , "p2" );
276
274
}
@@ -281,6 +279,15 @@ public void insertRawDataSimple(int numberOfRecords) throws Exception {
281
279
assertEquals ((int )response .getWrittenRows (), numberOfRecords );
282
280
}
283
281
282
+ @ DataProvider (name = "insertRawDataSimpleDataProvider" )
283
+ public static Object [][] insertRawDataSimpleDataProvider () {
284
+ return new Object [][] {
285
+ {"raw_data_table" },
286
+ {"`raw_data_table`" },
287
+ {"`" + ClickHouseServerForTest .getDatabase () + ".raw_data_table`" },
288
+ };
289
+ }
290
+
284
291
@ Test (groups = { "integration" })
285
292
public void testInsertMetricsOperationId () throws Exception {
286
293
final String tableName = "insert_metrics_test" ;
0 commit comments