http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs
----------------------------------------------------------------------
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs 
b/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs
new file mode 100644
index 0000000..31bcd41
--- /dev/null
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestsN.cs
@@ -0,0 +1,710 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace Apache.Geode.Client.UnitTests
+{
+  using NUnit.Framework;
+  using Apache.Geode.DUnitFramework;
+  using Apache.Geode.Client.Tests;
+  using Apache.Geode.Client;
+
+  [TestFixture]
+  [Category("group3")]
+  [Category("unicast_only")]
+  [Category("generics")]
+  public class ThinClientSecurityAuthzTests : ThinClientSecurityAuthzTestBase
+  {
+    #region Private members
+    IRegion<object, object> region;
+    IRegion<object, object> region1;
+    private UnitProcess m_client1;
+    private UnitProcess m_client2;
+    private UnitProcess m_client3;
+    private TallyListener<object, object> m_listener;
+    private TallyWriter<object, object> m_writer;
+    private string keys = "Key";
+    private string value = "Value";
+
+      
+    #endregion
+
+    protected override ClientBase[] GetClients()
+    {
+      m_client1 = new UnitProcess();
+      m_client2 = new UnitProcess();
+      m_client3 = new UnitProcess();
+      return new ClientBase[] { m_client1, m_client2, m_client3 };
+    }
+
+    public void CreateRegion(string locators, bool caching,
+      bool listener, bool writer)
+    {
+      if (listener)
+      {
+        m_listener = new TallyListener<object, object>();
+      }
+      else
+      {
+        m_listener = null;
+      }
+      IRegion<object, object> region = null;
+      region = CacheHelper.CreateTCRegion_Pool<object, object>(RegionName, 
true, caching,
+        m_listener, locators, "__TESTPOOL1_", true);
+      
+      if (writer)
+      {
+        m_writer = new TallyWriter<object, object>();
+      }
+      else
+      {
+        m_writer = null;
+      }
+      AttributesMutator<object, object> at = region.AttributesMutator;
+      at.SetCacheWriter(m_writer);
+    }
+
+    public void DoPut()
+    {
+      region = CacheHelper.GetRegion<object, object>(RegionName);
+      region[keys] = value;
+    }
+
+    public void CheckAssert()
+    {
+      Assert.AreEqual(true, m_writer.IsWriterInvoked, "Writer Should be 
invoked");
+      Assert.AreEqual(false, m_listener.IsListenerInvoked, "Listener Should 
not be invoked");
+      Assert.IsFalse(region.GetLocalView().ContainsKey(keys), "Key should have 
been found in the region");
+    }
+
+    public void DoLocalPut()
+    {
+      region1 = CacheHelper.GetRegion<object, object>(RegionName);
+      region1.GetLocalView()[m_keys[2]] = m_vals[2];
+      Assert.IsTrue(region1.GetLocalView().ContainsKey(m_keys[2]), "Key should 
have been found in the region");
+      Assert.AreEqual(true, m_writer.IsWriterInvoked, "Writer Should be 
invoked");
+      Assert.AreEqual(true, m_listener.IsListenerInvoked, "Listener Should be 
invoked");
+
+      //try Update
+      try
+      {
+        Util.Log("Trying UpdateEntry");
+        m_listener.ResetListenerInvokation();
+        UpdateEntry(RegionName, m_keys[2], m_nvals[2], false);
+        Assert.Fail("Should have got NotAuthorizedException during 
updateEntry");
+      }
+      catch (NotAuthorizedException)
+      {
+        Util.Log("NotAuthorizedException Caught");
+        Util.Log("Success");
+      }
+      catch (Exception other)
+      {
+        Util.Log("Stack trace: {0} ", other.StackTrace);
+        Util.Log("Got  exception : {0}", other.Message);
+      }
+      Assert.AreEqual(true, m_writer.IsWriterInvoked, "Writer should be 
invoked");
+      Assert.AreEqual(false, m_listener.IsListenerInvoked, "Listener should 
not be invoked");
+      Assert.IsTrue(region1.GetLocalView().ContainsKey(m_keys[2]), "Key should 
have been found in the region");
+      VerifyEntry(RegionName, m_keys[2], m_vals[2]);
+      m_writer.SetWriterFailed();
+
+      //test CacheWriter
+      try
+      {
+        Util.Log("Testing CacheWriterException");
+        UpdateEntry(RegionName, m_keys[2], m_nvals[2], false);
+        Assert.Fail("Should have got NotAuthorizedException during 
updateEntry");
+      }
+      catch (CacheWriterException)
+      {
+        Util.Log("CacheWriterException Caught");
+        Util.Log("Success");
+      }
+    
+    }
+
+    [TestFixtureTearDown]
+    public override void EndTests()
+    {
+      CacheHelper.StopJavaServers();
+      base.EndTests();
+    }
+
+    [TearDown]
+    public override void EndTest()
+    {
+      try
+      {
+        if (m_clients != null)
+        {
+          foreach (ClientBase client in m_clients)
+          {
+            client.Call(CacheHelper.Close);
+          }
+        }
+        CacheHelper.Close();
+        CacheHelper.ClearEndpoints();
+      }
+      finally
+      {
+        CacheHelper.StopJavaServers();
+      }
+      base.EndTest();
+    }
+
+    void runAllowPutsGets()
+    {
+      CacheHelper.SetupJavaServers(true, CacheXml1, CacheXml2);
+
+      CacheHelper.StartJavaLocator(1, "GFELOC");
+      Util.Log("Locator started");
+
+      foreach (AuthzCredentialGenerator authzGen in 
GetAllGeneratorCombos(false))
+      {
+        CredentialGenerator cGen = authzGen.GetCredentialGenerator();
+        Properties<string, string> extraAuthProps = cGen.SystemProperties;
+        Properties<string, string> javaProps = cGen.JavaProperties;
+        Properties<string, string> extraAuthzProps = authzGen.SystemProperties;
+        string authenticator = cGen.Authenticator;
+        string authInit = cGen.AuthInit;
+        string accessor = authzGen.AccessControl;
+
+        Util.Log("testAllowPutsGets: Using authinit: " + authInit);
+        Util.Log("testAllowPutsGets: Using authenticator: " + authenticator);
+        Util.Log("testAllowPutsGets: Using accessor: " + accessor);
+
+        // Start servers with all required properties
+        string serverArgs = SecurityTestUtil.GetServerArgs(authenticator,
+          accessor, null, SecurityTestUtil.ConcatProperties(extraAuthProps,
+          extraAuthzProps), javaProps);
+
+        // Start the two servers.
+        CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs);
+        Util.Log("Cacheserver 1 started.");
+        CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1, serverArgs);
+        Util.Log("Cacheserver 2 started.");
+
+        // Start client1 with valid CREATE credentials
+        Properties<string, string> createCredentials = 
authzGen.GetAllowedCredentials(
+          new OperationCode[] { OperationCode.Put },
+          new string[] { RegionName }, 1);
+        javaProps = cGen.JavaProperties;
+        Util.Log("AllowPutsGets: For first client PUT credentials: " +
+          createCredentials);
+        m_client1.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, createCredentials);
+
+        // Start client2 with valid GET credentials
+        Properties<string, string> getCredentials = 
authzGen.GetAllowedCredentials(
+          new OperationCode[] { OperationCode.Get },
+          new string[] { RegionName }, 2);
+        javaProps = cGen.JavaProperties;
+        Util.Log("AllowPutsGets: For second client GET credentials: " +
+          getCredentials);
+        m_client2.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, getCredentials);
+
+        // Perform some put operations from client1
+        m_client1.Call(DoPuts, 2);
+
+        // Verify that the gets succeed
+        m_client2.Call(DoGets, 2);
+
+        m_client1.Call(Close);
+        m_client2.Call(Close);
+
+        CacheHelper.StopJavaServer(1);
+        CacheHelper.StopJavaServer(2);
+      }
+
+      CacheHelper.StopJavaLocator(1);
+
+      CacheHelper.ClearEndpoints();
+      CacheHelper.ClearLocators();
+    }
+
+    void runDisallowPutsGets()
+    {
+      CacheHelper.SetupJavaServers(true, CacheXml1, CacheXml2);
+
+      CacheHelper.StartJavaLocator(1, "GFELOC");
+      Util.Log("Locator started");
+
+      foreach (AuthzCredentialGenerator authzGen in 
GetAllGeneratorCombos(false))
+      {
+        CredentialGenerator cGen = authzGen.GetCredentialGenerator();
+        Properties<string, string> extraAuthProps = cGen.SystemProperties;
+        Properties<string, string> javaProps = cGen.JavaProperties;
+        Properties<string, string> extraAuthzProps = authzGen.SystemProperties;
+        string authenticator = cGen.Authenticator;
+        string authInit = cGen.AuthInit;
+        string accessor = authzGen.AccessControl;
+
+        Util.Log("DisallowPutsGets: Using authinit: " + authInit);
+        Util.Log("DisallowPutsGets: Using authenticator: " + authenticator);
+        Util.Log("DisallowPutsGets: Using accessor: " + accessor);
+
+        // Check that we indeed can obtain valid credentials not allowed to do
+        // gets
+        Properties<string, string> createCredentials = 
authzGen.GetAllowedCredentials(
+          new OperationCode[] { OperationCode.Put },
+          new string[] { RegionName }, 1);
+        Properties<string, string> createJavaProps = cGen.JavaProperties;
+        Properties<string, string> getCredentials = 
authzGen.GetDisallowedCredentials(
+          new OperationCode[] { OperationCode.Get },
+          new string[] { RegionName }, 2);
+        Properties<string, string> getJavaProps = cGen.JavaProperties;
+        if (getCredentials == null || getCredentials.Size == 0)
+        {
+          Util.Log("DisallowPutsGets: Unable to obtain valid credentials " +
+            "with no GET permission; skipping this combination.");
+          continue;
+        }
+
+        // Start servers with all required properties
+        string serverArgs = SecurityTestUtil.GetServerArgs(authenticator,
+          accessor, null, SecurityTestUtil.ConcatProperties(extraAuthProps,
+          extraAuthzProps), javaProps);
+
+        // Start the two servers.
+        CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs);
+        Util.Log("Cacheserver 1 started.");
+        CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1, serverArgs);
+        Util.Log("Cacheserver 2 started.");
+
+        // Start client1 with valid CREATE credentials
+        createCredentials = authzGen.GetAllowedCredentials(
+            new OperationCode[] { OperationCode.Put },
+            new string[] { RegionName }, 1);
+        javaProps = cGen.JavaProperties;
+        Util.Log("DisallowPutsGets: For first client PUT credentials: " +
+          createCredentials);
+        m_client1.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, createCredentials);
+
+        // Start client2 with invalid GET credentials
+        getCredentials = authzGen.GetDisallowedCredentials(
+            new OperationCode[] { OperationCode.Get },
+            new string[] { RegionName }, 2);
+        javaProps = cGen.JavaProperties;
+        Util.Log("DisallowPutsGets: For second client invalid GET " +
+          "credentials: " + getCredentials);
+        m_client2.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, getCredentials);
+
+        // Perform some put operations from client1
+        m_client1.Call(DoPuts, 2);
+
+        // Verify that the gets throw exception
+        m_client2.Call(DoGets, 2, false, 
ExpectedResult.NotAuthorizedException);
+
+        // Try to connect client2 with reader credentials
+        getCredentials = authzGen.GetAllowedCredentials(
+            new OperationCode[] { OperationCode.Get },
+            new string[] { RegionName }, 5);
+        javaProps = cGen.JavaProperties;
+        Util.Log("DisallowPutsGets: For second client valid GET " +
+          "credentials: " + getCredentials);
+        m_client2.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, getCredentials);
+
+        // Verify that the gets succeed
+        m_client2.Call(DoGets, 2);
+
+        // Verify that the puts throw exception
+        m_client2.Call(DoPuts, 2, true, ExpectedResult.NotAuthorizedException);
+
+        m_client1.Call(Close);
+        m_client2.Call(Close);
+
+        CacheHelper.StopJavaServer(1);
+        CacheHelper.StopJavaServer(2);
+      }
+
+      CacheHelper.StopJavaLocator(1);
+
+      CacheHelper.ClearEndpoints();
+      CacheHelper.ClearLocators();
+    }
+
+    void runInvalidAccessor()
+    {
+      CacheHelper.SetupJavaServers(true, CacheXml1, CacheXml2);
+      CacheHelper.StartJavaLocator(1, "GFELOC");
+      Util.Log("Locator started");
+      foreach (AuthzCredentialGenerator authzGen in 
GetAllGeneratorCombos(false))
+      {
+        CredentialGenerator cGen = authzGen.GetCredentialGenerator();
+        Properties<string, string> extraAuthProps = cGen.SystemProperties;
+        Properties<string, string> javaProps = cGen.JavaProperties;
+        Properties<string, string> extraAuthzProps = authzGen.SystemProperties;
+        string authenticator = cGen.Authenticator;
+        string authInit = cGen.AuthInit;
+        string accessor = authzGen.AccessControl;
+
+        Util.Log("InvalidAccessor: Using authinit: " + authInit);
+        Util.Log("InvalidAccessor: Using authenticator: " + authenticator);
+
+        // Start server1 with invalid accessor
+        string serverArgs = SecurityTestUtil.GetServerArgs(authenticator,
+          "com.gemstone.none", null, 
SecurityTestUtil.ConcatProperties(extraAuthProps,
+          extraAuthzProps), javaProps);
+        CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs);
+        Util.Log("Cacheserver 1 started.");
+
+        // Client creation should throw exceptions
+        Properties<string, string> createCredentials = 
authzGen.GetAllowedCredentials(
+            new OperationCode[] { OperationCode.Put },
+            new string[] { RegionName }, 3);
+        javaProps = cGen.JavaProperties;
+        Util.Log("InvalidAccessor: For first client PUT credentials: " +
+          createCredentials);
+        m_client1.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, createCredentials,
+          ExpectedResult.OtherException);
+        Properties<string, string> getCredentials = 
authzGen.GetAllowedCredentials(
+            new OperationCode[] { OperationCode.Get },
+            new string[] { RegionName }, 7);
+        javaProps = cGen.JavaProperties;
+        Util.Log("InvalidAccessor: For second client GET credentials: " +
+          getCredentials);
+        m_client2.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, getCredentials,
+          ExpectedResult.OtherException);
+
+        // Now start server2 that has valid accessor
+        Util.Log("InvalidAccessor: Using accessor: " + accessor);
+        serverArgs = SecurityTestUtil.GetServerArgs(authenticator,
+          accessor, null, SecurityTestUtil.ConcatProperties(extraAuthProps,
+          extraAuthzProps), javaProps);
+        CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1, serverArgs);
+        Util.Log("Cacheserver 2 started.");
+        CacheHelper.StopJavaServer(1);
+
+        // Client creation should be successful now
+        m_client1.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, createCredentials);
+        m_client2.Call(SecurityTestUtil.CreateClient, RegionName,
+          CacheHelper.Locators, authInit, getCredentials);
+
+        // Now perform some put operations from client1
+        m_client1.Call(DoPuts, 4);
+
+        // Verify that the gets succeed
+        m_client2.Call(DoGets, 4);
+
+        m_client1.Call(Close);
+        m_client2.Call(Close);
+
+        CacheHelper.StopJavaServer(2);
+      }
+
+      CacheHelper.StopJavaLocator(1);
+
+      CacheHelper.ClearEndpoints();
+      CacheHelper.ClearLocators();
+    }
+
+    void runAllOpsWithFailover()
+    {
+      runAllOpsWithFailover(false, false);
+    }
+
+    void runAllOpsWithFailover(bool ssl, bool withPassword)
+    {
+      OperationWithAction[] allOps = {
+        // Test CREATE and verify with a GET
+        new OperationWithAction(OperationCode.Put, 3, OpFlags.CheckNotAuthz, 
4),
+        new OperationWithAction(OperationCode.Put),
+        new OperationWithAction(OperationCode.Get, 3, OpFlags.CheckNoKey
+            | OpFlags.CheckNotAuthz, 4),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.CheckNoKey, 4),
+
+        // OPBLOCK_END indicates end of an operation block; the above block of
+        // three operations will be first executed on server1 and then on
+        // server2 after failover
+        OperationWithAction.OpBlockEnd,
+
+        // Test GetServerKeys (KEY_SET) operation.
+        new OperationWithAction(OperationCode.GetServerKeys),
+        new OperationWithAction(OperationCode.GetServerKeys, 3, 
OpFlags.CheckNotAuthz, 4),
+
+        OperationWithAction.OpBlockEnd,
+
+        // Test UPDATE and verify with a GET
+        new OperationWithAction(OperationCode.Put, 3, OpFlags.UseNewVal
+            | OpFlags.CheckNotAuthz, 4),
+        new OperationWithAction(OperationCode.Put, 1, OpFlags.UseNewVal, 4),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseOldConn
+            | OpFlags.UseNewVal, 4),
+
+        OperationWithAction.OpBlockEnd,
+
+        // Test DESTROY and verify with a GET and that key should not exist
+        new OperationWithAction(OperationCode.Destroy, 3, OpFlags.UseNewVal
+            | OpFlags.CheckNotAuthz, 4),
+        new OperationWithAction(OperationCode.Destroy),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseOldConn
+            | OpFlags.CheckFail, 4),
+        // Repopulate the region
+        new OperationWithAction(OperationCode.Put, 1, OpFlags.UseNewVal, 4),
+
+        OperationWithAction.OpBlockEnd,
+
+        // Check QUERY
+        new OperationWithAction(OperationCode.Put),
+        new OperationWithAction(OperationCode.Query, 3,
+          OpFlags.CheckNotAuthz, 4),
+        new OperationWithAction(OperationCode.Query),
+
+        OperationWithAction.OpBlockEnd,
+
+        // Register interest in all keys
+        new OperationWithAction(OperationCode.RegisterInterest, 3,
+            OpFlags.UseAllKeys | OpFlags.CheckNotAuthz, 4),
+        new OperationWithAction(OperationCode.RegisterInterest, 2,
+            OpFlags.UseAllKeys, 4),
+        // UPDATE and test with GET
+        new OperationWithAction(OperationCode.Put),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseOldConn
+            | OpFlags.LocalOp, 4),
+
+        // Unregister interest in all keys
+        new OperationWithAction(OperationCode.UnregisterInterest, 2,
+            OpFlags.UseAllKeys | OpFlags.UseOldConn, 4),
+        // UPDATE and test with GET for no updates
+        new OperationWithAction(OperationCode.Put, 1, OpFlags.UseOldConn
+            | OpFlags.UseNewVal, 4),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseOldConn
+            | OpFlags.LocalOp, 4),
+
+        OperationWithAction.OpBlockEnd,
+
+        /// PutAll, GetAll, ExecuteCQ and ExecuteFunction ops
+        new OperationWithAction(OperationCode.PutAll),
+        // NOTE: GetAll depends on previous PutAll so it should happen right 
after.
+        new OperationWithAction(OperationCode.GetAll),
+        new OperationWithAction(OperationCode.RemoveAll),
+        new OperationWithAction(OperationCode.ExecuteCQ),
+        new OperationWithAction(OperationCode.ExecuteFunction),
+
+        OperationWithAction.OpBlockEnd,
+
+        // Register interest in all keys using list
+        new OperationWithAction(OperationCode.RegisterInterest, 3,
+            OpFlags.UseList | OpFlags.CheckNotAuthz, 4),
+        new OperationWithAction(OperationCode.RegisterInterest, 1,
+            OpFlags.UseList, 4),
+        // UPDATE and test with GET
+        new OperationWithAction(OperationCode.Put, 2),
+        new OperationWithAction(OperationCode.Get, 1, OpFlags.UseOldConn
+            | OpFlags.LocalOp, 4),
+
+        // Unregister interest in all keys using list
+        new OperationWithAction(OperationCode.UnregisterInterest, 1,
+            OpFlags.UseOldConn | OpFlags.UseList, 4),
+        // UPDATE and test with GET for no updates
+        new OperationWithAction(OperationCode.Put, 2, OpFlags.UseOldConn
+            | OpFlags.UseNewVal, 4),
+        new OperationWithAction(OperationCode.Get, 1, OpFlags.UseOldConn
+            | OpFlags.LocalOp, 4),
+
+        OperationWithAction.OpBlockEnd,
+
+        // Register interest in all keys using regular expression
+        new OperationWithAction(OperationCode.RegisterInterest, 3,
+            OpFlags.UseRegex | OpFlags.CheckNotAuthz, 4),
+        new OperationWithAction(OperationCode.RegisterInterest, 2,
+            OpFlags.UseRegex, 4),
+        // UPDATE and test with GET
+        new OperationWithAction(OperationCode.Put),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseOldConn
+            | OpFlags.LocalOp, 4),
+
+        // Unregister interest in all keys using regular expression
+        new OperationWithAction(OperationCode.UnregisterInterest, 2,
+            OpFlags.UseOldConn | OpFlags.UseRegex, 4),
+        // UPDATE and test with GET for no updates
+        new OperationWithAction(OperationCode.Put, 1, OpFlags.UseOldConn
+            | OpFlags.UseNewVal, 4),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseOldConn
+            | OpFlags.LocalOp, 4),
+
+        OperationWithAction.OpBlockEnd,
+
+        // Do REGION_DESTROY of the sub-region and check with GET
+        new OperationWithAction(OperationCode.Put, 1, OpFlags.UseSubRegion,
+            8),
+        new OperationWithAction(OperationCode.RegionDestroy, 3,
+            OpFlags.UseSubRegion | OpFlags.CheckNotAuthz, 1),
+        new OperationWithAction(OperationCode.RegionDestroy, 1,
+            OpFlags.UseSubRegion, 1),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseSubRegion
+            | OpFlags.CheckNoKey | OpFlags.CheckException, 8),
+
+        // Do REGION_DESTROY of the region and check with GET
+        new OperationWithAction(OperationCode.RegionDestroy, 3,
+            OpFlags.CheckNotAuthz, 1),
+        new OperationWithAction(OperationCode.RegionDestroy, 1, OpFlags.None,
+            1),
+        new OperationWithAction(OperationCode.Get, 2, OpFlags.UseOldConn
+            | OpFlags.CheckNoKey | OpFlags.CheckException, 8),
+
+        // Skip failover for region destroy since it shall fail
+        // without restarting the server
+        OperationWithAction.OpBlockNoFailover
+      };
+      if (ssl == true && withPassword == true)
+      {
+        RunOpsWithFailoverSSL(allOps, "AllOpsWithFailover", true);
+      }
+      else  if(ssl == true)
+        RunOpsWithFailoverSSL(allOps, "AllOpsWithFailover", false);
+      else
+        RunOpsWithFailover(allOps, "AllOpsWithFailover");
+    }
+
+    void runThinClientWriterExceptionTest()
+    {
+      CacheHelper.SetupJavaServers(true, CacheXml1);
+      CacheHelper.StartJavaLocator(1, "GFELOC");
+      Util.Log("Locator started");
+      foreach (AuthzCredentialGenerator authzGen in 
GetAllGeneratorCombos(false))
+      {
+        for (int i = 1; i <= 2; ++i)
+        {
+          CredentialGenerator cGen = authzGen.GetCredentialGenerator();
+          Properties<string, string> extraAuthProps = cGen.SystemProperties;
+          Properties<string, string> javaProps = cGen.JavaProperties;
+          Properties<string, string> extraAuthzProps = 
authzGen.SystemProperties;
+          string authenticator = cGen.Authenticator;
+          string authInit = cGen.AuthInit;
+          string accessor = authzGen.AccessControl;
+
+          Util.Log("ThinClientWriterException: Using authinit: " + authInit);
+          Util.Log("ThinClientWriterException: Using authenticator: " + 
authenticator);
+          Util.Log("ThinClientWriterException: Using accessor: " + accessor);
+
+          // Start servers with all required properties
+          string serverArgs = SecurityTestUtil.GetServerArgs(authenticator,
+            accessor, null, SecurityTestUtil.ConcatProperties(extraAuthProps,
+            extraAuthzProps), javaProps);
+
+          // Start the server.
+          CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1, serverArgs);
+          Util.Log("Cacheserver 1 started.");
+
+          // Start client1 with valid CREATE credentials
+          Properties<string, string> createCredentials = 
authzGen.GetDisallowedCredentials(
+            new OperationCode[] { OperationCode.Put },
+            new string[] { RegionName }, 1);
+          javaProps = cGen.JavaProperties;
+          Util.Log("DisallowPuts: For first client PUT credentials: " +
+            createCredentials);
+          m_client1.Call(SecurityTestUtil.CreateClientR0, RegionName,
+          CacheHelper.Locators, authInit, createCredentials);
+
+          Util.Log("Creating region in client1 , no-ack, no-cache, with 
listener and writer");
+          m_client1.Call(CreateRegion,CacheHelper.Locators,
+            true, true, true);
+          m_client1.Call(RegisterAllKeys, new string[] { RegionName });
+
+          try
+          {
+            Util.Log("Trying put Operation");
+            m_client1.Call(DoPut);
+            Util.Log(" Put Operation Successful");
+            Assert.Fail("Should have got NotAuthorizedException during put");
+          }
+          catch (NotAuthorizedException)
+          {
+            Util.Log("NotAuthorizedException Caught");
+            Util.Log("Success");
+          }
+          catch (Exception other)
+          {
+            Util.Log("Stack trace: {0} ", other.StackTrace);
+            Util.Log("Got  exception : {0}",
+             other.Message);
+          }
+          m_client1.Call(CheckAssert);
+          // Do LocalPut
+          m_client1.Call(DoLocalPut);
+
+          m_client1.Call(Close);
+
+          CacheHelper.StopJavaServer(1);
+        }
+      }
+      CacheHelper.StopJavaLocator(1);
+      CacheHelper.ClearEndpoints();
+      CacheHelper.ClearLocators();
+    }
+
+    #region Tests
+
+    [Test]
+    public void AllowPutsGets()
+    {
+      runAllowPutsGets();
+    }
+
+    [Test]
+    public void DisallowPutsGets()
+    {
+      runDisallowPutsGets();
+    }
+
+    //this test no more valid as the way we do auth now change, so it gets 
different exception
+    //[Test]
+    public void InvalidAccessor()
+    {
+      //runInvalidAccessor();
+    }
+
+    [Test]
+    public void AllOpsWithFailover()
+    {
+      runAllOpsWithFailover();
+    }
+    
+    [Test]
+    public void AllOpsWithFailoverWithSSL()
+    {
+      // SSL CAN ONLY BE ENABLED WITH LOCATORS THUS REQUIRING POOLS.
+      runAllOpsWithFailover(true, false); // pool with locator with ssl
+    }
+
+    [Test]
+    public void AllOpsWithFailoverWithSSLWithPassword()
+    {
+      // SSL CAN ONLY BE ENABLED WITH LOCATORS THUS REQUIRING POOLS.
+      runAllOpsWithFailover(true, true); // pool with locator with ssl
+    }
+
+    [Test]
+    public void ThinClientWriterExceptionTest()
+    {
+      runThinClientWriterExceptionTest();
+    }
+    #endregion
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/integration-test/ThinClientStatisticTestsN.cs
----------------------------------------------------------------------
diff --git a/clicache/integration-test/ThinClientStatisticTestsN.cs 
b/clicache/integration-test/ThinClientStatisticTestsN.cs
new file mode 100644
index 0000000..69bc5e9
--- /dev/null
+++ b/clicache/integration-test/ThinClientStatisticTestsN.cs
@@ -0,0 +1,255 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Apache.Geode.Client.UnitTests
+{
+  using NUnit.Framework;
+  using Apache.Geode.DUnitFramework;
+  using System.Threading;
+
+  using Apache.Geode.Client;
+
+  public class TestStatisticsType
+  {
+    public StatisticsType testStatsType;
+    public int statIdIntCounter;
+    public int statIdIntGauge;
+    public int statIdLongCounter;
+    public int statIdLongGauge;
+    public int statIdDoubleCounter;
+    public int statIdDoubleGauge;
+  };
+
+  public class IncThread
+  {
+    private Statistics m_stat;
+    private TestStatisticsType m_type;
+
+    public IncThread (Statistics stat,TestStatisticsType type)
+    {
+      this.m_stat = stat;
+      this.m_type = type;
+    }
+
+    public void ThreadOperation()
+    {
+      /* Just 1000 Inc, Stop after that  */
+      for ( int incIdx = 0 ; incIdx < 1000 ; incIdx++ ) {
+      m_stat.IncInt(m_type.statIdIntCounter, 1 ); 
+      m_stat.IncInt(m_type.statIdIntGauge, 1 ); 
+      m_stat.IncLong(m_type.statIdLongCounter, 1 ); 
+      m_stat.IncLong(m_type.statIdLongGauge, 1 ); 
+      m_stat.IncDouble(m_type.statIdDoubleCounter, 1.0 ); 
+      m_stat.IncDouble(m_type.statIdDoubleGauge, 1.0 ); 
+      }
+    }
+  };
+
+  [TestFixture]
+  [Category("group1")]
+  [Category("unicast_only")]
+  [Category("generics")]
+  public class ThinClientStatisticTests : UnitTests
+  {
+    //#region Private members
+    private UnitProcess m_client1;
+    //#endregion
+
+    protected override ClientBase[] GetClients()
+    {
+      m_client1 = new UnitProcess();
+      return new ClientBase[] { m_client1 };
+    }
+
+    [TestFixtureTearDown]
+    public override void EndTests()
+    {
+      CacheHelper.StopJavaServers();
+      base.EndTests();
+    }
+
+    [TearDown]
+    public override void EndTest()
+    {
+      try
+      {
+        CacheHelper.ClearEndpoints();
+        CacheHelper.ClearLocators();
+      }
+      finally
+      {
+        CacheHelper.StopJavaServers();
+        CacheHelper.StopJavaLocators();
+      }
+      base.EndTest();
+    }
+
+    [Test]
+    public void StatisticsCheckTest()
+    {
+      CacheHelper.SetupJavaServers(false, "cacheserver.xml");
+      CacheHelper.StartJavaServer(1, "GFECS1");
+      Util.Log("Cacheserver 1 started.");
+
+      m_client1.Call(CacheHelper.InitClient);
+
+      m_client1.Call(statisticsTest);
+
+      CacheHelper.StopJavaServer(1);
+      Util.Log("Cacheserver 1 stopped.");
+
+      CacheHelper.ClearEndpoints();
+      m_client1.Call(CacheHelper.Close);
+    }
+
+    #region Functions invoked by the tests
+
+    public void Close()
+    {
+      CacheHelper.Close();
+    }
+
+    void createType(StatisticsFactory statFactory, TestStatisticsType testType)
+    {
+      StatisticDescriptor[] statDescriptorArr = new StatisticDescriptor[6];
+
+      statDescriptorArr[0] = statFactory.CreateIntCounter("IntCounter",
+      "Test Statistic Descriptor int_t Counter.","TestUnit");
+
+      statDescriptorArr[1] = statFactory.CreateIntGauge("IntGauge",
+      "Test Statistic Descriptor int_t Gauge.","TestUnit");
+
+      statDescriptorArr[2] = statFactory.CreateLongCounter("LongCounter",
+      "Test Statistic Descriptor Long Counter.","TestUnit");
+
+      statDescriptorArr[3] = statFactory.CreateLongGauge("LongGauge",
+      "Test Statistic Descriptor Long Gauge.","TestUnit");
+
+      statDescriptorArr[4] = statFactory.CreateDoubleCounter("DoubleCounter",
+      "Test Statistic Descriptor Double Counter.","TestUnit");
+
+      statDescriptorArr[5] = statFactory.CreateDoubleGauge("DoubleGauge",
+      "Test Statistic Descriptor Double Gauge.","TestUnit");
+      
+      StatisticsType statsType = statFactory.CreateType("TestStatsType",
+                               "Statistics for Unit Test.",statDescriptorArr, 
6);
+
+      Assert.IsNotNull(statsType, "Error in creating Stats Type");
+      
+      testType.testStatsType = statsType;
+      testType.statIdIntCounter = statsType.NameToId("IntCounter");
+      testType.statIdIntGauge = statsType.NameToId("IntGauge");
+      testType.statIdLongCounter = statsType.NameToId("LongCounter");
+      testType.statIdLongGauge = statsType.NameToId("LongGauge");
+      testType.statIdDoubleCounter = statsType.NameToId("DoubleCounter");
+      testType.statIdDoubleGauge = statsType.NameToId("DoubleGauge");
+
+      StatisticsType statsType1 = statFactory.CreateType("TestStatsType1",
+                              "Statistics for Unit Test", statDescriptorArr, 
6);
+      testType.testStatsType = statsType1;
+
+      /* Test Find */
+      Assert.IsNotNull(statFactory.FindType("TestStatsType"),"stat not found");
+      Assert.IsNotNull(statFactory.FindType("TestStatsType1"), "stat not 
found");   
+      Assert.IsNull(statFactory.FindType("TestStatsType2"),"stat not to be 
found");
+    }
+
+    void testGetSetIncFunctions(Statistics stat,  TestStatisticsType type )
+    {
+      /* Set a initial value =  10 */
+      stat.SetInt(type.statIdIntCounter, 10);
+      stat.SetInt(type.statIdIntGauge, 10);
+      stat.SetLong(type.statIdLongCounter, 10);
+      stat.SetLong(type.statIdLongGauge, 10);
+      stat.SetDouble(type.statIdDoubleCounter, 10.0);
+      stat.SetDouble(type.statIdDoubleGauge, 10.0);
+      Util.Log(" Setting Initial Value Complete");
+      
+      /* Check Initial Value = 10*/
+      Assert.AreEqual(10, stat.GetInt(type.statIdIntCounter), " Check1 1 
Failed ");
+      Assert.AreEqual(10, stat.GetInt(type.statIdIntGauge), " Check1 2 Failed 
");
+      Assert.AreEqual(10, stat.GetLong(type.statIdLongCounter), " Check1 3 
Failed ");
+      Assert.AreEqual(10, stat.GetLong(type.statIdLongGauge), " Check1 4 
Failed ");
+      Assert.AreEqual(10.0, stat.GetDouble(type.statIdDoubleCounter), " Check1 
5 Failed ");
+      Assert.AreEqual(10.0, stat.GetDouble(type.statIdDoubleGauge), " Check1 6 
Failed ");
+      Util.Log(" All Set() were correct.");
+      
+      /* Increment single thread for 100 times */
+      for ( int incIdx = 0 ; incIdx < 100 ; incIdx++ ) {
+        stat.IncInt(type.statIdIntCounter, 1);
+        stat.IncInt(type.statIdIntGauge, 1);
+        stat.IncLong(type.statIdLongCounter, 1);
+        stat.IncLong(type.statIdLongGauge, 1);
+        stat.IncDouble(type.statIdDoubleCounter, 1.0);
+        stat.IncDouble(type.statIdDoubleGauge, 1.0);
+        Thread.Sleep(10);
+      }
+      Util.Log(" Incremented 100 times by 1.");
+      
+      /* Check Incremented Value = 110 */
+      Assert.AreEqual(110, stat.GetInt(type.statIdIntCounter), " Check2 1 
Failed ");
+      Assert.AreEqual(110, stat.GetInt(type.statIdIntGauge), " Check2 2 Failed 
");
+      Assert.AreEqual(110, stat.GetLong(type.statIdLongCounter), " Check2 3 
Failed ");
+      Assert.AreEqual(110, stat.GetLong(type.statIdLongGauge), " Check2 4 
Failed ");
+      Assert.AreEqual(110.0, stat.GetDouble(type.statIdDoubleCounter), " 
Check2 5 Failed ");
+      Assert.AreEqual(110.0, stat.GetDouble(type.statIdDoubleGauge), " Check2 
6 Failed ");
+      Util.Log(" Single thread Inc() Passed.");
+
+      IncThread[] myThreads = new IncThread[10];
+      Thread[] thread = new Thread[10];
+
+      for (int i = 0; i < 10; i++)
+      {
+        myThreads[i] = new IncThread(stat, type);
+        thread[i] = new Thread(new ThreadStart(myThreads[i].ThreadOperation));
+        thread[i].Start();
+      }
+      Thread.Sleep(1000);
+      for (int i = 0; i < 10; i++)
+      {
+        thread[i].Join();
+      }
+
+      /* Check Final Value = 10,110 */
+      Assert.AreEqual(10110, stat.GetInt(type.statIdIntCounter), " Check2 1 
Failed ");
+      Assert.AreEqual(10110, stat.GetInt(type.statIdIntGauge), " Check2 2 
Failed ");
+      Assert.AreEqual(10110, stat.GetLong(type.statIdLongCounter), " Check2 3 
Failed ");
+      Assert.AreEqual(10110, stat.GetLong(type.statIdLongGauge), " Check2 4 
Failed ");
+      Assert.AreEqual(10110.0, stat.GetDouble(type.statIdDoubleCounter), " 
Check2 5 Failed ");
+      Assert.AreEqual(10110.0, stat.GetDouble(type.statIdDoubleGauge), " 
Check2 6 Failed ");
+      Util.Log(" Parallel Inc() Passed.");
+
+      /* Check value of Gauge type */
+      stat.SetInt(type.statIdIntGauge, 50);
+      stat.SetDouble(type.statIdDoubleGauge, 50.0);
+      stat.SetLong(type.statIdLongGauge, 50);
+
+      Assert.AreEqual(50, stat.GetInt(type.statIdIntGauge), " Check3 1 
Failed");
+      Assert.AreEqual(50, stat.GetLong(type.statIdLongGauge), "Check3 2 
Failed");
+      Assert.AreEqual(50.0, stat.GetDouble(type.statIdDoubleGauge), "Check3 3 
Failed");
+    }
+
+    void statisticsTest()
+    {
+
+    }
+
+    #endregion
+  };
+}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/integration-test/ThinClientStringArrayTestsN.cs
----------------------------------------------------------------------
diff --git a/clicache/integration-test/ThinClientStringArrayTestsN.cs 
b/clicache/integration-test/ThinClientStringArrayTestsN.cs
new file mode 100644
index 0000000..6294bb0
--- /dev/null
+++ b/clicache/integration-test/ThinClientStringArrayTestsN.cs
@@ -0,0 +1,232 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace Apache.Geode.Client.UnitTests
+{
+  using NUnit.Framework;
+  using Apache.Geode.DUnitFramework;
+  using Apache.Geode.Client.Tests;
+  using Apache.Geode.Client;
+
+
+  [TestFixture]
+  [Category("group4")]
+  [Category("unicast_only")]
+  [Category("generics")]
+  
+  public class ThinClientStringArrayTests : ThinClientRegionSteps
+  {
+    #region Private members
+
+    private UnitProcess m_client1;
+    private UnitProcess m_client2;
+    private static string[] QueryRegionNames = { "Portfolios", "Positions", 
"Portfolios2",
+      "Portfolios3" };
+    private static string QERegionName = "Portfolios";
+
+    #endregion
+
+    protected override ClientBase[] GetClients()
+    {
+      m_client1 = new UnitProcess();
+      m_client2 = new UnitProcess();
+      return new ClientBase[] { m_client1, m_client2 };
+    }
+
+    [TestFixtureSetUp]
+    public override void InitTests()
+    {
+      base.InitTests();
+      m_client1.Call(InitClient);
+      m_client2.Call(InitClient);
+    }
+
+    [TearDown]
+    public override void EndTest()
+    {
+      CacheHelper.StopJavaServers();
+      base.EndTest();
+    }
+
+
+    public void InitClient()
+    {
+      CacheHelper.Init();
+      try
+      {
+        Serializable.RegisterTypeGeneric(Portfolio.CreateDeserializable, 
CacheHelper.DCache);
+        Serializable.RegisterTypeGeneric(Position.CreateDeserializable, 
CacheHelper.DCache);
+      }
+      catch (IllegalStateException)
+      {
+        // ignore since we run multiple incarnations of client in same process
+      }
+    }
+    public void StepOne(string locators)
+    {
+      CacheHelper.CreateTCRegion_Pool<object, object>(QueryRegionNames[0], 
true, true,
+        null, locators, "__TESTPOOL1_", true);
+      CacheHelper.CreateTCRegion_Pool<object, object>(QueryRegionNames[1], 
true, true,
+        null, locators, "__TESTPOOL1_", true);
+      CacheHelper.CreateTCRegion_Pool<object, object>(QueryRegionNames[2], 
true, true,
+        null, locators, "__TESTPOOL1_", true);
+      CacheHelper.CreateTCRegion_Pool<object, object>(QueryRegionNames[3], 
true, true,
+        null, locators, "__TESTPOOL1_", true);
+
+      IRegion<object, object> region = CacheHelper.GetRegion<object, 
object>(QueryRegionNames[0]);
+      Apache.Geode.Client.RegionAttributes<object, object> regattrs = 
region.Attributes;
+      region.CreateSubRegion(QueryRegionNames[1], regattrs);
+    }
+
+    public void StepTwo()
+    {
+      IRegion<object, object> region0 = CacheHelper.GetRegion<object, 
object>(QueryRegionNames[0]);
+      IRegion<object, object> subRegion0 = 
region0.GetSubRegion(QueryRegionNames[1]);
+      IRegion<object, object> region1 = CacheHelper.GetRegion<object, 
object>(QueryRegionNames[1]);
+      IRegion<object, object> region2 = CacheHelper.GetRegion<object, 
object>(QueryRegionNames[2]);
+      IRegion<object, object> region3 = CacheHelper.GetRegion<object, 
object>(QueryRegionNames[3]);
+
+      QueryHelper<object, object> qh = QueryHelper<object, 
object>.GetHelper(CacheHelper.DCache);
+      Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
+        qh.PortfolioNumSets);
+
+      string[] cnm = { "C#aaa", "C#bbb", "C#ccc", "C#ddd" };
+      //CacheableStringArray cnm = CacheableStringArray.Create(sta);
+      qh.PopulatePortfolioData(region0, qh.PortfolioSetSize,
+        qh.PortfolioNumSets, 1, cnm);
+      qh.PopulatePositionData(subRegion0, qh.PortfolioSetSize,
+        qh.PortfolioNumSets);
+      qh.PopulatePositionData(region1, qh.PortfolioSetSize,
+        qh.PortfolioNumSets);
+      qh.PopulatePortfolioData(region2, qh.PortfolioSetSize,
+        qh.PortfolioNumSets, 1, cnm);
+      qh.PopulatePortfolioData(region3, qh.PortfolioSetSize,
+        qh.PortfolioNumSets, 1, cnm);
+    }
+
+    public void StepTwoQT()
+    {
+      IRegion<object, object> region0 = CacheHelper.GetRegion<object, 
object>(QueryRegionNames[0]);
+      IRegion<object, object> subRegion0 = 
region0.GetSubRegion(QueryRegionNames[1]);
+
+      QueryHelper<object, object> qh = QueryHelper<object, 
object>.GetHelper(CacheHelper.DCache);
+      string[] /*sta*/ cnm = { "C#aaa", "C#bbb", "C#ccc", "C#ddd" };
+      //CacheableStringArray cnm = CacheableStringArray.Create(sta);
+      qh.PopulatePortfolioData(region0, 4, 2, 2, cnm);
+      qh.PopulatePositionData(subRegion0, 4, 2);
+    }
+
+    public void StepOneQE(string locators)
+    {
+      CacheHelper.CreateTCRegion_Pool<object, object>(QERegionName, true, true,
+        null, locators, "__TESTPOOL1_", true);
+      IRegion<object, object> region = CacheHelper.GetVerifyRegion<object, 
object>(QERegionName);
+      string[] /*sta*/ cnm = { "C#aaa", "C#bbb", "C#ccc", "C#ddd" };
+      //CacheableStringArray cnm = CacheableStringArray.Create(sta);
+      Portfolio p1 = new Portfolio(1, 2, cnm);
+      Portfolio p2 = new Portfolio(2, 2, cnm);
+      Portfolio p3 = new Portfolio(3, 2, cnm);
+      Portfolio p4 = new Portfolio(4, 2, cnm);
+
+      region["1"] = p1;
+      region["2"] = p2;
+      region["3"] = p3;
+      region["4"] = p4;
+
+      QueryService<object, object> qs = null;
+      qs = 
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
 object>();
+      Query<object> qry = qs.NewQuery("select * from /" + QERegionName + "  p 
where p.ID!=3");
+      ISelectResults<object> results = qry.Execute();
+      Util.Log("Results size {0}.", results.Size);
+
+      SelectResultsIterator<object> iter = results.GetIterator();
+
+      while (iter.HasNext)
+      {
+        /*IGeodeSerializable*/ object item = iter.Next();
+        Portfolio port = item as Portfolio;
+        if (port == null)
+        {
+          Position pos = item as Position;
+          if (pos == null)
+          {
+            //CacheableString cs = item as CacheableString;
+            string cs = item as string;
+            if (cs == null)
+            {
+              Util.Log("Query got other/unknown object.");
+            }
+            else
+            {
+              Util.Log("Query got string : {0}.", cs);
+            }
+          }
+          else
+          {
+            Util.Log("Query got Position object with secId {0}, shares {1}.", 
pos.SecId, pos.SharesOutstanding);
+          }
+        }
+        else
+        {
+          Util.Log("Query got Portfolio object with ID {0}, pkid {1}.", 
port.ID, port.Pkid);
+        }
+      }
+      // Bring down the region
+      region.GetLocalView().DestroyRegion();
+    }
+
+    void runStringArrayTest()
+    {
+      CacheHelper.SetupJavaServers(true, "remotequeryN.xml");
+      CacheHelper.StartJavaLocator(1, "GFELOC");
+      Util.Log("Locator started");
+      CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1);
+      Util.Log("Cacheserver 1 started.");
+
+      m_client1.Call(StepOne, CacheHelper.Locators);
+      Util.Log("StepOne complete.");
+
+      m_client1.Call(StepTwo);
+      Util.Log("StepTwo complete.");
+
+      m_client1.Call(StepOneQE, CacheHelper.Locators);
+      Util.Log("StepOneQE complete.");
+
+      m_client1.Call(Close);
+
+      CacheHelper.StopJavaServer(1);
+      Util.Log("Cacheserver 1 stopped.");
+
+      CacheHelper.StopJavaLocator(1);
+      Util.Log("Locator stopped");
+
+      CacheHelper.ClearLocators();
+      CacheHelper.ClearEndpoints();
+    }
+
+    [Test]
+    public void StringArrayTest()
+    {
+      runStringArrayTest();
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/integration-test/Timeouts.xml
----------------------------------------------------------------------
diff --git a/clicache/integration-test/Timeouts.xml 
b/clicache/integration-test/Timeouts.xml
new file mode 100644
index 0000000..458a175
--- /dev/null
+++ b/clicache/integration-test/Timeouts.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<Settings timeout="1800">
+  <ClientServerTests>
+    <BigValue timeout="2700" />
+  </ClientServerTests>
+  <PutGetTests>
+    <CheckPutGet timeout="4200" />
+  </PutGetTests>
+  <ThinClientRegionTests>
+    <CheckPutGet timeout="4200" />
+  </ThinClientRegionTests>
+  <ThinClientQueryTests>
+    <QueryTimeout timeout="4200" />
+  </ThinClientQueryTests>
+  <ThinClientDurableTests>
+    <DurableAndNonDurableBasic timeout="4200" />
+  </ThinClientDurableTests>
+  <ThinClientSecurityAuthzTests>
+    <AllOpsWithFailover timeout="4800" />
+  </ThinClientSecurityAuthzTests>
+  <ThinClientSecurityAuthzTestsMU>
+    <AllOpsWithFailover timeout="4800" />
+  </ThinClientSecurityAuthzTestsMU>
+</Settings>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/integration-test/UnitTests.csproj.in
----------------------------------------------------------------------
diff --git a/clicache/integration-test/UnitTests.csproj.in 
b/clicache/integration-test/UnitTests.csproj.in
new file mode 100644
index 0000000..a670c9c
--- /dev/null
+++ b/clicache/integration-test/UnitTests.csproj.in
@@ -0,0 +1,627 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<Project DefaultTargets="Build" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"; ToolsVersion="4.0">
+  <PropertyGroup>
+    <CMAKE_SOURCE_DIR>${CMAKE_SOURCE_DIR_NATIVE}</CMAKE_SOURCE_DIR>
+    
<CMAKE_CURRENT_SOURCE_DIR>${CMAKE_CURRENT_SOURCE_DIR_NATIVE}</CMAKE_CURRENT_SOURCE_DIR>
+       <CMAKE_BINARY_DIR>${CMAKE_BINARY_DIR_NATIVE}</CMAKE_BINARY_DIR>
+       
<CMAKE_CURRENT_BINARY_DIR>${CMAKE_CURRENT_BINARY_DIR_NATIVE}</CMAKE_CURRENT_BINARY_DIR>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x64</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{CC6D226A-1DFF-31D1-89D1-D99420F6AF72}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Apache.Geode.Client.UnitTests</RootNamespace>
+    <AssemblyName>UnitTests</AssemblyName>
+    
<TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <IntermediateOutputPath>Debug</IntermediateOutputPath>
+    <OutputPath>Debug</OutputPath>
+    <Optimize>false</Optimize>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <NoWarn>618</NoWarn>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <IntermediateOutputPath>Release</IntermediateOutputPath>
+    <OutputPath>Release</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <Optimize>false</Optimize>
+    <IntermediateOutputPath>Debug</IntermediateOutputPath>
+    <OutputPath>Debug</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <NoWarn>618</NoWarn>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>    
+    <IntermediateOutputPath>Release</IntermediateOutputPath>
+    <OutputPath>Release</OutputPath>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <NoWarn>618</NoWarn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>${STRONG_NAME_KEY_ENABLED}</SignAssembly>
+    <AssemblyOriginatorKeyFile>${STRONG_NAME_KEY}</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="nunit.framework">
+      <HintPath>${NUNIT}\bin\framework\nunit.framework.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Management" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile 
Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\PortfolioPdx.cs">
+      <Link>PortfolioPdx.cs</Link>
+    </Compile>
+    <Compile 
Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\PositionPdx.cs">
+      <Link>PositionPdx.cs</Link>
+    </Compile>
+    <Compile 
Include="$(CMAKE_SOURCE_DIR)\tests\cli\QueryHelper\QueryHelperN.cs">
+      <Link>QueryHelperN.cs</Link>
+    </Compile>
+    <Compile 
Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\Portfolio.cs">
+      <Link>Portfolio.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\Position.cs">
+      <Link>Position.cs</Link>
+    </Compile>
+    <Compile 
Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\SimpleCacheListener.cs">
+      <Link>SimpleCacheListener.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\AssemblyInfo.cs">
+      <Link>AssemblyInfo.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DataOutputTests.cs">
+      <Link>DataOutputTests.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DefaultCacheableN.cs">
+      <Link>DefaultCacheableN.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyListener.cs">
+      <Link>TallyListener.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyResolverN.cs">
+      <Link>TallyResolverN.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyWriter.cs">
+      <Link>TallyWriter.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCallbackArgN.cs">
+      <Link>ThinClientCallbackArgN.cs</Link>
+    </Compile>
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientDurableCqTestsN.cs">
+      <Link>ThinClientDurableCqTestsN.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPdxTests.cs">
+      <Link>ThinClientPdxTests.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\AttributesFactoryTestsN.cs" 
/>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\AttributesMutatorTestsN.cs" 
/>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheHelperN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\CachelessTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DistOpsStepsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\PutGetTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionWrapperN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SecurityTestUtilN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyListenerN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyLoaderN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\TallyWriterN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionStepsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\UnitTestsN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientRegionInterestTestsN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthTestsN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientStatisticTestsN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthTestsMUN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthzTestBaseN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthzTestsMUN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientSecurityAuthzTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientQueryTestsN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientAppDomainQueryTests.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientAppDomainFunctionExecutionTests.cs"
 />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\BuiltinCacheableWrappersN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheableWrapperN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DupListenerN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\RegionOperationN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientFunctionExecutionTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientHARegionTestsN.cs" 
/>
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientListenerWriterN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientPoolTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\DurableListenerN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientDurableTestsN.cs" 
/>
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ExpirationTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\OverflowTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\SerializationTestsN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientConflationTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqIRTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCqTestsN.cs" />
+    <Compile 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientStringArrayTestsN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientCSTXN.cs" />
+    <Compile Include="$(CMAKE_CURRENT_SOURCE_DIR)\ThinClientDeltaTestN.cs" />
+    <Compile 
Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\DeltaTestImpl.cs">
+      <Link>DeltaTestImpl.cs</Link>
+    </Compile>
+    <Compile 
Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\TestObject1.cs">
+      <Link>TestObject1.cs</Link>
+    </Compile>
+    <Compile Include="$(CMAKE_SOURCE_DIR)\tests\cli\NewTestObject\DeltaEx.cs">
+      <Link>DeltaEx.cs</Link>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="$(CMAKE_CURRENT_SOURCE_DIR)\geode.properties.mixed">
+      <Link>geode.properties.mixed</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="$(CMAKE_CURRENT_SOURCE_DIR)\geode.properties.nativeclient">
+      <Link>geode.properties.nativeclient</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="$(CMAKE_CURRENT_SOURCE_DIR)\system.properties">
+      <Link>system.properties</Link>
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="authz5_5.dtd" />
+    <None Include="cdb.pl" />
+    <None Include="runCSFunctions.sh" />
+    <None Include="runCSTests.sh" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription_forDoc.xml">
+      <Link>cacheserver_notify_subscription_forDoc.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_partitioned.xml">
+      <Link>cacheserver1_partitioned.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_TradeKey.xml">
+      <Link>cacheserver1_TradeKey.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_partitioned.xml">
+      <Link>cacheserver2_partitioned.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_TradeKey.xml">
+      <Link>cacheserver2_TradeKey.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_TradeKey.xml">
+      <Link>cacheserver3_TradeKey.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverDurableCqs.xml">
+      <Link>cacheserverDurableCqs.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_pdxinstance_hashcode.xml">
+      <Link>cacheserver_pdxinstance_hashcode.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_servergroup.xml">
+      <Link>cacheserver_servergroup.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_servergroup2.xml">
+      <Link>cacheserver_servergroup2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_generics_plugins.xml">
+      <Link>client_generics_plugins.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_pdx.xml">
+      <Link>client_pdx.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\Settings.xml">
+      <Link>Settings.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\Timeouts.xml">
+      <Link>Timeouts.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\valid_overflowAttr.xml">
+      <Link>valid_overflowAttr.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver.xml">
+      <Link>cacheserver.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverPdxSerializer.xml">
+      <Link>cacheserverPdxSerializer.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheServer_pdxreadserialized.xml">
+      <Link>cacheServer_pdxreadserialized.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverPdx2.xml">
+      <Link>cacheserverPdx2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverForPdx.xml">
+      <Link>cacheserverForPdx.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverMDS1.xml">
+      <Link>cacheserverMDS1.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverMDS2.xml">
+      <Link>cacheserverMDS2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserverPdx.xml">
+      <Link>cacheserverPdx.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_expiry.xml">
+      <Link>cacheserver1_expiry.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_fpr.xml">
+      <Link>cacheserver1_fpr.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_pool.xml">
+      <Link>cacheserver1_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver1_pr.xml">
+      <Link>cacheserver1_pr.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2.xml">
+      <Link>cacheserver2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_fpr.xml">
+      <Link>cacheserver2_fpr.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_pool.xml">
+      <Link>cacheserver2_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver2_pr.xml">
+      <Link>cacheserver2_pr.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3.xml">
+      <Link>cacheserver3.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_fpr.xml">
+      <Link>cacheserver3_fpr.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_pool.xml">
+      <Link>cacheserver3_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver3_pr.xml">
+      <Link>cacheserver3_pr.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_conflation.xml">
+      <Link>cacheserver_conflation.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_hashcode.xml">
+      <Link>cacheserver_hashcode.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_interest_notify.xml">
+      <Link>cacheserver_interest_notify.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription.xml">
+      <Link>cacheserver_notify_subscription.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription2.xml">
+      <Link>cacheserver_notify_subscription2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription3.xml">
+      <Link>cacheserver_notify_subscription3.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription4.xml">
+      <Link>cacheserver_notify_subscription4.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription5.xml">
+      <Link>cacheserver_notify_subscription5.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription5N.xml">
+      <Link>cacheserver_notify_subscription5N.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_notify_subscription6.xml">
+      <Link>cacheserver_notify_subscription6.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_pool_client.xml">
+      <Link>cacheserver_pool_client.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoql.xml">
+      <Link>cacheserver_remoteoql.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoql2.xml">
+      <Link>cacheserver_remoteoql2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoqlN.xml">
+      <Link>cacheserver_remoteoqlN.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_remoteoql2N.xml">
+      <Link>cacheserver_remoteoql2N.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_with_delta.xml">
+      <Link>cacheserver_with_delta.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_with_deltaAD.xml">
+      <Link>cacheserver_with_deltaAD.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\cacheserver_with_delta_test_impl.xml">
+      <Link>cacheserver_with_delta_test_impl.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheServPoolRedun1.xml">
+      <Link>CacheServPoolRedun1.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheServPoolRedun2.xml">
+      <Link>CacheServPoolRedun2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CacheServPoolRedun3.xml">
+      <Link>CacheServPoolRedun3.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cache_redundancy.xml">
+      <Link>cache_redundancy.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_pool.xml">
+      <Link>client_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache1.xml">
+      <Link>invalid_cache1.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache2.xml">
+      <Link>invalid_cache2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache3.xml">
+      <Link>invalid_cache3.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool.xml">
+      <Link>invalid_cache_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool2.xml">
+      <Link>invalid_cache_pool2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool3.xml">
+      <Link>invalid_cache_pool3.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_cache_pool4.xml">
+      <Link>invalid_cache_pool4.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_overflowAttr1.xml">
+      <Link>invalid_overflowAttr1.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_overflowAttr2.xml">
+      <Link>invalid_overflowAttr2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\invalid_overflowAttr3.xml">
+      <Link>invalid_overflowAttr3.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfig.xml">
+      <Link>regionquery_diffconfig.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfig2.xml">
+      <Link>regionquery_diffconfig2.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfigN.xml">
+      <Link>regionquery_diffconfigN.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\regionquery_diffconfig2N.xml">
+      <Link>regionquery_diffconfig2N.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\remotequery.xml">
+      <Link>remotequery.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\remotequeryN.xml">
+      <Link>remotequeryN.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\cqqueryfailover.xml">
+      <Link>cqqueryfailover.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\serverDurableClient.xml">
+      <Link>serverDurableClient.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\valid_cache.xml">
+      <Link>valid_cache.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\valid_cache_pool.xml">
+      <Link>valid_cache_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\multi_get_function_server.xml">
+      <Link>multi_get_function_server.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\func_cacheserver1_pool.xml">
+      <Link>func_cacheserver1_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\func_cacheserver2_pool.xml">
+      <Link>func_cacheserver2_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\func_cacheserver3_pool.xml">
+      <Link>func_cacheserver3_pool.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_server_persistent_transactions.xml">
+      <Link>client_server_persistent_transactions.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content 
Include="$(CMAKE_CURRENT_SOURCE_DIR)\client_server_transactions.xml">
+      <Link>client_server_transactions.xml</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\CMakeLists.txt"/>
+    <Content Include="$(CMAKE_CURRENT_SOURCE_DIR)\UnitTests.csproj.in"/>
+    <Content Include="authz-dummy.xml" />
+    <Content Include="authz-ldap.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\plugins\SQLiteCLI\SQLiteCLI.csproj">
+      <Project>{FF9597E3-A4DD-4FDE-871D-B0C66088762F}</Project>
+      <Name>SQLiteCLI</Name>
+    </ProjectReference>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\clicache\src\Apache.Geode.vcxproj">
+      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+    </ProjectReference>       
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\tests\cli\DUnitFramework\DUnitFramework.csproj">
+      <Project>{796727E8-3A6A-46BE-A2DB-584A4774CD51}</Project>
+      <Name>DUnitFramework</Name>
+    </ProjectReference>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\tests\cli\FwkClient\FwkClient.csproj">
+      <Project>{9EFAA401-B5D1-4592-A2FF-0972C776FF6A}</Project>
+      <Name>FwkClient</Name>
+    </ProjectReference>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\tests\cli\PdxClassLibrary\PdxClassLibrary.csproj">
+      <Project>{10613802-A371-4C27-8F66-CE79BFCAC3F2}</Project>
+      <Name>PdxClassLibrary</Name>
+    </ProjectReference>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\tests\cli\PdxVersion1Lib\PdxVersion1Lib.csproj">
+      <Project>{97F9965D-6B3D-44F6-92B3-5880A3C7178E}</Project>
+      <Name>PdxVersion1Lib</Name>
+    </ProjectReference>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\tests\cli\PdxVersion2Lib\PdxVersion2Lib.csproj">
+      <Project>{5055633B-6D1C-488D-B934-1AC482C915F7}</Project>
+      <Name>PdxVersion2Lib</Name>
+    </ProjectReference>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\tests\cli\QueryHelper\QueryWrapper.vcxproj">
+      <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+      <Name>QueryWrapper</Name>
+    </ProjectReference>
+    <ProjectReference 
Include="$(CMAKE_BINARY_DIR)\tests\cli\SecurityUtil\SecurityUtil.csproj">
+      <Project>{29CFC13C-1D6C-4FE8-B56E-A5E7BA7F849F}</Project>
+      <Name>SecurityUtil</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets 
below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/integration-test/UnitTestsN.cs
----------------------------------------------------------------------
diff --git a/clicache/integration-test/UnitTestsN.cs 
b/clicache/integration-test/UnitTestsN.cs
new file mode 100644
index 0000000..2650e2a
--- /dev/null
+++ b/clicache/integration-test/UnitTestsN.cs
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace Apache.Geode.Client.UnitTests
+{
+  using NUnit.Framework;
+  using Apache.Geode.DUnitFramework;
+  using Apache.Geode.Client;
+  using System.IO;
+
+  //using Region = Apache.Geode.Client.IRegion<Object, Object>;
+
+  /// <summary>
+  /// Setup the test parameters including logfile, timebomb and timeout 
settings.
+  /// Also close the cache for each client in teardown.
+  /// </summary>
+  public abstract class UnitTests : DUnitTestClass
+  {
+    protected virtual string ExtraPropertiesFile
+    {
+      get
+      {
+        return null;
+      }
+    }
+
+    protected DateTime m_startTime;
+    protected DateTime m_endTime;
+
+    protected override void SetLogging(string logFile)
+    {
+      base.SetLogging(logFile);
+      CacheHelper.SetLogging();
+    }
+
+    protected override void SetClientLogging(ClientBase[] clients, string 
logFile)
+    {
+      base.SetClientLogging(clients, logFile);
+      if (clients != null)
+      {
+        foreach (ClientBase client in clients)
+        {
+          client.Call(CacheHelper.SetLogging);
+        }
+      }
+    }
+
+    [TestFixtureSetUp]
+    public override void InitTests()
+    {
+      base.InitTests();
+      string extraPropsFile = ExtraPropertiesFile;
+      if (extraPropsFile != null)
+      {
+        CacheHelper.SetExtraPropertiesFile(extraPropsFile);
+        if (m_clients != null)
+        {
+          foreach (ClientBase client in m_clients)
+          {
+            client.Call(CacheHelper.SetExtraPropertiesFile, extraPropsFile);
+          }
+        }
+      }
+    }
+
+    [TestFixtureTearDown]
+    public override void EndTests()
+    {
+      string coverageXMLs = string.Empty;
+      string startDir = null;
+      bool hasCoverage = "true".Equals(Environment.GetEnvironmentVariable(
+        "COVERAGE_ENABLED"));
+      try
+      {
+        CacheHelper.SetExtraPropertiesFile(null);
+        if (m_clients != null)
+        {
+          foreach (ClientBase client in m_clients)
+          {
+            try
+            {
+              client.Call(CacheHelper.Close);
+            }
+            catch (System.Runtime.Remoting.RemotingException)
+            {
+            }
+            catch (System.Net.Sockets.SocketException)
+            {
+            }
+            if (hasCoverage)
+            {
+              coverageXMLs = coverageXMLs + " coverage-" + client.ID + ".xml";
+              startDir = client.StartDir;
+            }
+          }
+        }
+        CacheHelper.Close();
+      }
+      finally
+      {
+        base.EndTests();
+      }
+      // merge ncover output
+      if (coverageXMLs.Length > 0)
+      {
+        string mergedCoverage = "merged-coverage.xml";
+        string mergedCoverageTmp = "merged-coverage-tmp.xml";
+        System.Diagnostics.Process mergeProc;
+        if (File.Exists(mergedCoverage))
+        {
+          coverageXMLs = coverageXMLs + " " + mergedCoverage;
+        }
+        //Console.WriteLine("Current directory: " + 
Environment.CurrentDirectory + "; merging: " + coverageXMLs);
+        if (!Util.StartProcess("ncover.reporting.exe", coverageXMLs + " //s "
+          + mergedCoverageTmp, Util.LogFile == null, startDir,
+          true, true, true, out mergeProc))
+        {
+          Assert.Fail("FATAL: Could not start ncover.reporting");
+        }
+        if (!mergeProc.WaitForExit(UnitProcess.MaxEndWaitMillis)
+          && !mergeProc.HasExited)
+        {
+          mergeProc.Kill();
+        }
+        File.Delete(mergedCoverage);
+        File.Move(mergedCoverageTmp, mergedCoverage);
+        if (m_clients != null)
+        {
+          foreach (ClientBase client in m_clients)
+          {
+            File.Delete("coverage-" + client.ID + ".xml");
+          }
+        }
+      }
+    }
+
+    [TearDown]
+    public override void EndTest()
+    {
+      CacheHelper.EndTest();
+      base.EndTest();
+    }
+
+    public void StartTimer()
+    {
+      m_startTime = DateTime.Now;
+    }
+
+    public TimeSpan StopTimer()
+    {
+      m_endTime = DateTime.Now;
+      return (m_endTime - m_startTime);
+    }
+
+    public void LogTaskTiming(ClientBase client, string taskName, int numOps)
+    {
+      StopTimer();
+      TimeSpan elapsed = m_endTime - m_startTime;
+      Util.Log("{0}Time taken for task [{1}]: {2}ms {3}ops/sec{4}",
+        Util.MarkerString, taskName, elapsed.TotalMilliseconds,
+        (numOps * 1000) / elapsed.TotalMilliseconds, Util.MarkerString);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode-native/blob/6cbd424f/clicache/integration-test/cache.xml
----------------------------------------------------------------------
diff --git a/clicache/integration-test/cache.xml 
b/clicache/integration-test/cache.xml
new file mode 100644
index 0000000..906ce04
--- /dev/null
+++ b/clicache/integration-test/cache.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<client-cache
+    xmlns="http://schema.pivotal.io/gemfire/gfcpp-cache";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xsi:schemaLocation="http://schema.pivotal.io/gemfire/gfcpp-cache
+                        
http://schema.pivotal.io/gemfire/gfcpp-cache/gfcpp-cache-9.0.xsd";
+    version="9.0">
+</client-cache>
+

Reply via email to