Skip to content

Commit

Permalink
init test env
Browse files Browse the repository at this point in the history
  • Loading branch information
Matagits committed Apr 8, 2024
1 parent 9f0a2bc commit cfbd64f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.apache.spark.sql.types.{BooleanType, DateType, DoubleType, FloatType,
StructField, StructType, TimestampType}

import java.sql.{Date, Timestamp}
import java.util.Properties


class TestInsertPlan extends SparkTestSuite {
Expand All @@ -33,7 +34,14 @@ class TestInsertPlan extends SparkTestSuite {
val db = "offline_insert_test"

override def customizedBefore(): Unit = {
val prop = new Properties
prop.load(getClass.getResourceAsStream("/test.properties"))
val cluster = prop.getProperty("openmldb.zk.cluster", "127.0.0.1:6181")
val path = prop.getProperty("openmldb.zk.root.path", "/onebox")
sparkSession = getSparkSession()
sparkSession.conf.set("openmldb.zk.cluster", cluster)
sparkSession.conf.set("openmldb.zk.root.path", path)

openmldbSession = new OpenmldbSession(sparkSession)
openmldbConnector = openmldbSession.openmldbCatalogService.sqlExecutor
openmldbConnector.createDB(db)
Expand Down

0 comments on commit cfbd64f

Please sign in to comment.