i have a test case which looks like
`"A dataFrameToDataSet function" should "return DataSet from dataframe" in {
implicit val spark: SparkSession = SparkSession.builder().getOrCreate()
import spark.implicits._
val sourceName = List("oracle_grc_asset", "oracle_grc_asset_host")
val columnName = Seq("ASSET_ID", "ASSET_NAME", "ASSET_UUID", "ASSET_TYPE", "DESCRIPTION", "CUSTOMER_ID", "IS_DELETED", "SITE_ID", "USER_ID", "REMOTE_ID",
"REMOTE_VERSION", "NETWORK_UUID", "TAG_REEVAL_DATE", "CREATED_BY", "UPDATED_BY", "CREATE_DATE", "UPDATE_DATE", "REGION", "ENVIRONMENT", "POD")
val asset = Seq((java.math.BigDecimal.valueOf(123), "bat", "abc", "cat", "abc", 2134L, java.math.BigDecimal.valueOf(3.4), 3L,
5L, "abce", 7L, "sda", java.sql.Timestamp.valueOf("2011-10-02 18:48:05.123456"), 42L, 32L, java.sql.Timestamp.valueOf("2011-10-02 18:48:05.123456")
, java.sql.Timestamp.valueOf("2011-10-02 18:48:05.123456"), "India", "Test", "Pod01")).toDF(columnName: _*)
val ds = dataFrameToDataSet(sourceName.head, asset)
assert(ds.count() === 1)
assert(ds.getClass.getSimpleName === "Dataset")
assert(ds.getClass.getSimpleName !== "Dataframe")`
now when i am running this locally it passes but when i run it through jenkins it fails. what can be potential reasons? and what i need to change to run it on jenkins?
Aucun commentaire:
Enregistrer un commentaire