public void TestFixtureSetup()
 {
     CcmHelper.Start(1, null, null, null, "graph");
     Trace.TraceInformation("Waiting additional time for test Cluster to be ready");
     Thread.Sleep(20000);
     CreateClassicGraph(CcmHelper.InitialContactPoint, GraphName);
 }
 public void TestFixtureSetup()
 {
     if (Values == null || Values.Length == 0)
     {
         throw new InconclusiveException("You must specify the values to test");
     }
     CcmHelper.Start(1);
     Cluster = DseCluster.Builder().AddContactPoint(CcmHelper.InitialContactPoint).Build();
     Trace.TraceInformation("Waiting additional time for test Cluster to be ready");
     Thread.Sleep(15000);
     Session = Cluster.Connect();
     Session.Execute(string.Format(CreateKeyspaceQuery, Keyspace));
     Session.Execute(string.Format("USE {0}", Keyspace));
     _queries = new[]
     {
         string.Format("CREATE TABLE geotable1 (id text, value '{0}', PRIMARY KEY (id))", TypeName),
         string.Format("CREATE TABLE keyed (id '{0}', value text, PRIMARY KEY (id))", TypeName),
         string.Format("INSERT INTO keyed (id, value) VALUES ('{0}', 'hello')", Values[0]),
         string.Format("CREATE TYPE geo_udt (f text, v '{0}')", TypeName),
         "CREATE TABLE tbl_udts (id uuid PRIMARY KEY, value frozen<geo_udt>)",
         string.Format("CREATE TABLE tbl_tuple (id uuid PRIMARY KEY, value tuple<int, '{0}'>)", TypeName),
         string.Format("CREATE TABLE tbl_list (id uuid PRIMARY KEY, value list<'{0}'>)", TypeName),
         string.Format("CREATE TABLE tbl_set (id uuid PRIMARY KEY, value set<'{0}'>)", TypeName),
         string.Format("CREATE TABLE tbl_map (id uuid PRIMARY KEY, value map<text, '{0}'>)", TypeName)
     };
     foreach (var query in _queries)
     {
         Session.Execute(query);
     }
 }
 public void TestFixtureTearDown()
 {
     if (Cluster != null)
     {
         Cluster.Dispose();
     }
     CcmHelper.Remove();
 }
 public void TearDown()
 {
     try
     {
         CcmHelper.Remove();
     }
     catch
     {
         //Tried to remove, never mind if it fails.
     }
 }
        public void Should_Authenticate_Against_Dse_Daemon_With_PasswordAuthenticator()
        {
            CcmHelper.Start(
                1,
                cassYamlOptions: new[] { "authenticator: PasswordAuthenticator" },
                jvmArgs: new[] { "-Dcassandra.superuser_setup_delay_ms=0" });
            Trace.TraceInformation("Waiting additional time for test Cluster to be ready");
            Thread.Sleep(15000);
            var authProvider = new DsePlainTextAuthProvider("cassandra", "cassandra");

            using (var cluster = Cluster.Builder()
                                 .AddContactPoint(CcmHelper.InitialContactPoint)
                                 .WithAuthProvider(authProvider)
                                 .Build())
            {
                var session = cluster.Connect();
                AssertCanQuery(session);
            }
        }
        public void Should_Authenticate_Against_Dse_5_DseAuthenticator()
        {
            CcmHelper.Start(
                1,
                new[] { "authentication_options.default_scheme: internal" },
                new[] { "authenticator: com.datastax.bdp.cassandra.auth.DseAuthenticator" },
                new[] { "-Dcassandra.superuser_setup_delay_ms=0" });
            Trace.TraceInformation("Waiting additional time for test Cluster to be ready");
            Thread.Sleep(15000);
            var authProvider = new DsePlainTextAuthProvider("cassandra", "cassandra");

            using (var cluster = Cluster.Builder()
                                 .AddContactPoint(CcmHelper.InitialContactPoint)
                                 .WithAuthProvider(authProvider)
                                 .Build())
            {
                var session = cluster.Connect();
                AssertCanQuery(session);
            }
        }
 public void TestFixtureTearDown()
 {
     CcmHelper.Remove();
 }
Exemple #8
0
 public void TestFixtureSetup()
 {
     CcmHelper.Start(3, new[] { "initial_spark_worker_resources:0.1" }, null, null, "graph,spark");
     Trace.TraceInformation("Waiting additional time for test Cluster to be ready");
     Thread.Sleep(15000);
 }
Exemple #9
0
 public void TestFixtureSetup()
 {
     CcmHelper.Start(1);
     Trace.TraceInformation("Waiting additional time for test Cluster to be ready");
     Thread.Sleep(15000);
 }