Пример #1
0
        public async Task InitNewSession()
        {
            var snowflakeClient = new SnowflakeClient(_conectionInfo.User, _conectionInfo.Password, _conectionInfo.Account, _conectionInfo.Region);

            var sessionInitialized = await snowflakeClient.InitNewSessionAsync();

            Assert.IsTrue(sessionInitialized);
            Assert.IsNotNull(snowflakeClient.SnowflakeSession);
        }
Пример #2
0
        public async Task RenewSession()
        {
            var snowflakeClient = new SnowflakeClient(_conectionInfo.User, _conectionInfo.Password, _conectionInfo.Account, _conectionInfo.Region);

            var sessionInitialized = await snowflakeClient.InitNewSessionAsync();

            var firstSessionToken = snowflakeClient.SnowflakeSession.SessionToken;

            var sessionRenewed = await snowflakeClient.RenewSessionAsync();

            var secondSessionToken = snowflakeClient.SnowflakeSession.SessionToken;

            Assert.IsTrue(sessionInitialized);
            Assert.IsTrue(sessionRenewed);
            Assert.IsTrue(firstSessionToken != secondSessionToken);
        }