Пример #1
0
        [Timeout(30 * 1000)] // ms
        public void CreateDeleteContainer_AsyncClient()
        {
            // Creates the client
            IHDInsightCertificateConnectionCredentials credentials = IntegrationTestBase.GetValidCredentials();
            var client = new ClusterProvisioningClient(credentials.SubscriptionId, credentials.Certificate);

            client.PollingInterval = TimeSpan.FromMilliseconds(100);

            TestValidAdvancedCluster(
                () => client.ListContainers().WaitForResult(),
                dnsName => client.ListContainer(dnsName).WaitForResult(),
                cluster => client.CreateContainer(cluster).WaitForResult(),
                dnsName => client.DeleteContainer(dnsName).WaitForResult());
        }
Пример #2
0
        public void InvalidCreateDeleteContainer_FailsOnSdk()
        {
            var clusterRequest = base.GetRandomCluster();

            clusterRequest.HiveMetastore = new ComponentMetastore(TestCredentials.HiveStores[0].SqlServer,
                                                                  TestCredentials.HiveStores[0].Database,
                                                                  TestCredentials.HiveStores[0].Username,
                                                                  TestCredentials.HiveStores[0].Password);
            IHDInsightCertificateConnectionCredentials credentials = IntegrationTestBase.GetValidCredentials();
            var client = new ClusterProvisioningClient(credentials.SubscriptionId, credentials.Certificate);

            client.PollingInterval = TimeSpan.FromMilliseconds(100);

            TestClusterEndToEnd(
                clusterRequest,
                () => client.ListContainers().WaitForResult(),
                dnsName => client.ListContainer(dnsName).WaitForResult(),
                cluster => client.CreateContainer(cluster).WaitForResult(),
                dnsName => client.DeleteContainer(dnsName).WaitForResult());
        }
Пример #3
0
        public void InvalidCreateDeleteContainer_FailsOnSdk()
        {            
            var clusterRequest = base.GetRandomCluster();
            clusterRequest.HiveMetastore = new ComponentMetastore(TestCredentials.HiveStores[0].SqlServer,
                                                           TestCredentials.HiveStores[0].Database,
                                                           TestCredentials.HiveStores[0].Username,
                                                           TestCredentials.HiveStores[0].Password);
            IHDInsightCertificateConnectionCredentials credentials = IntegrationTestBase.GetValidCredentials();
            var client = new ClusterProvisioningClient(credentials.SubscriptionId, credentials.Certificate);
            client.PollingInterval = TimeSpan.FromMilliseconds(100);

            TestClusterEndToEnd(
                clusterRequest,
                () => client.ListContainers().WaitForResult(),
                dnsName => client.ListContainer(dnsName).WaitForResult(),
                cluster => client.CreateContainer(cluster).WaitForResult(),
                dnsName => client.DeleteContainer(dnsName).WaitForResult());
        }
Пример #4
0
        [Timeout(30 * 1000)] // ms
        public void CreateDeleteContainer_BasicClusterAsyncClient()
        {
            // Creates the client
            IHDInsightCertificateConnectionCredentials credentials = IntegrationTestBase.GetValidCredentials();
            var client = new ClusterProvisioningClient(credentials.SubscriptionId, credentials.Certificate);
            client.PollingInterval = TimeSpan.FromMilliseconds(100);

            TestClusterEndToEnd(
                base.GetRandomCluster(),
                () => client.ListContainers().WaitForResult(),
                dnsName => client.ListContainer(dnsName).WaitForResult(),
                cluster => client.CreateContainer(cluster).WaitForResult(),
                dnsName => client.DeleteContainer(dnsName).WaitForResult());
        }