frankgh commented on code in PR #38:
URL: 
https://github.com/apache/cassandra-analytics/pull/38#discussion_r1480589895


##########
cassandra-analytics-integration-tests/src/test/java/org/apache/cassandra/analytics/QuoteIdentifiersWriteTest.java:
##########
@@ -76,58 +59,31 @@ class QuoteIdentifiersWriteTest extends 
SharedClusterSparkIntegrationTestBase
                   uniqueTestTableFullName("keyspace"), // keyspace is a 
reserved word
                   uniqueTestTableFullName(TEST_KEYSPACE, "QuOtEd_TaBlE"),
                   new QualifiedName(TEST_KEYSPACE, "table"));  // table is a 
reserved word
+    Dataset<Row> df;
 
     @ParameterizedTest(name = "{index} => table={0}")
     @MethodSource("testInputs")
     void testQuoteIdentifiersBulkWrite(QualifiedName tableName)
     {
-        SparkSession spark = getOrCreateSparkSession();
-        SparkContext sc = spark.sparkContext();
-        JavaSparkContext javaSparkContext = 
JavaSparkContext.fromSparkContext(sc);
-        SQLContext sql = spark.sqlContext();
-
-        int parallelism = sc.defaultParallelism();
-        JavaRDD<Row> rows = genDataset(javaSparkContext, ROW_COUNT, 
parallelism);
-        Dataset<Row> df = sql.createDataFrame(rows, writeSchema());
-
         bulkWriterDataFrameWriter(df, 
tableName).option(WriterOptions.QUOTE_IDENTIFIERS.name(), "true")
                                                 .save();
-        validateWrites(tableName, rows);
+        validateWrites(cluster, tableName, df);

Review Comment:
   consolidated this code in a helper class 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to