diff --git a/core/src/main/scala/zio/nebula/package.scala b/core/src/main/scala/zio/nebula/package.scala index 479bbd2..d2e28fb 100644 --- a/core/src/main/scala/zio/nebula/package.scala +++ b/core/src/main/scala/zio/nebula/package.scala @@ -12,7 +12,7 @@ import zio.nebula.storage._ package object nebula { type SessionClient = NebulaSessionClient - type Client = NebulaClient with NebulaSessionPoolConfig with NebulaPoolConfig + type Client = NebulaClient with NebulaPoolConfig type Storage = NebulaStorageClient type Meta = NebulaMetaClient diff --git a/core/src/test/scala/zio/nebula/NebulaSpec.scala b/core/src/test/scala/zio/nebula/NebulaSpec.scala index c9ea485..dc62c37 100644 --- a/core/src/test/scala/zio/nebula/NebulaSpec.scala +++ b/core/src/test/scala/zio/nebula/NebulaSpec.scala @@ -22,12 +22,12 @@ trait NebulaSpec extends ZIOSpecDefault { (specLayered @@ beforeAll( ZIO.serviceWithZIO[NebulaClient](_.init()) *> ZIO.serviceWithZIO[NebulaClient]( - _.openSession().flatMap(_.execute(Stmt.str(""" - |CREATE SPACE IF NOT EXISTS test(vid_type=fixed_string(20)); - |USE test; - |CREATE TAG IF NOT EXISTS person(name string, age int); - |CREATE EDGE IF NOT EXISTS like(likeness double) - |""".stripMargin))) + _.openSession(false).flatMap(_.execute(Stmt.str(""" + |CREATE SPACE IF NOT EXISTS test(vid_type=fixed_string(20)); + |USE test; + |CREATE TAG IF NOT EXISTS person(name string, age int); + |CREATE EDGE IF NOT EXISTS like(likeness double) + |""".stripMargin))) ) ) @@ sequential @@ eventually) .provideShared( diff --git a/core/src/test/scala/zio/nebula/ZioNebulaEnvironment.scala b/core/src/test/scala/zio/nebula/ZioNebulaEnvironment.scala index adb032c..e867993 100644 --- a/core/src/test/scala/zio/nebula/ZioNebulaEnvironment.scala +++ b/core/src/test/scala/zio/nebula/ZioNebulaEnvironment.scala @@ -39,15 +39,10 @@ object ZioNebulaEnvironment { maxConnsSize = 10, intervalIdleMills = 100, waitTimeMills = 100, - sslParam = None - ) - ) ++ ZLayer.fromZIO( - ZIO.attempt( - NebulaSessionPoolConfig( - List(NebulaHostAddress(host, port)), - NebulaAuth(defaultUser, defaultPwd), - defaultSpace - ) + sslParam = None, + address = List(NebulaHostAddress(host, port)), + auth = NebulaAuth(defaultUser, defaultPwd), + spaceName = Some(defaultSpace) ) )