Example #1
0
        public void ProxyAndDistributor_Read_DirectReadFromOneServerMock()
        {
            const int storageServer = 22261;

            var writer = new HashWriter(new HashMapConfiguration("TestProxyAndDistributorRead1Servers", HashMapCreationMode.CreateNew, 1, 3, HashFileType.Distributor));

            writer.CreateMap();
            writer.SetServer(0, "localhost", storageServer, 157);
            writer.Save();

            var dhc        = new DistributorHashConfiguration(1);
            var queue      = new QueueConfiguration(1, 100);
            var connection = new ConnectionConfiguration("testService", 10);
            var dcc        = new DistributorCacheConfiguration(TimeSpan.FromMilliseconds(600), TimeSpan.FromMilliseconds(1000));
            var ndrc       = new NetReceiverConfiguration(22260, "localhost", "testService");
            var ndrc12     = new NetReceiverConfiguration(23260, "localhost", "testService");

            var distr = new DistributorSystem(new ServerId("localhost", 22260),
                                              new ServerId("localhost", 23260),
                                              dhc, queue, connection, dcc, ndrc, ndrc12,
                                              new TransactionConfiguration(1),
                                              new HashMapConfiguration("TestProxyAndDistributorRead1Servers",
                                                                       HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Distributor),
                                              new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                              new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                              new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout));

            var server = new ServerId("localhost", 23260);

            distr.Build();

            _proxy.Start();
            distr.Start();

            GlobalQueue.Queue.Start();

            _proxy.Distributor.SayIAmHere(server);

            var s = TestHelper.OpenWriterHost(new ServerId("localhost", storageServer), connection);

            s.retData = TestHelper.CreateEvent(new StoredDataHashCalculator(), 10);

            var api = _proxy.CreateApi("Event", false, new StoredDataHashCalculator());

            UserTransaction transaction;
            var             read = (StoredData)api.Read(10, out transaction);

            Assert.AreEqual(10, read.Id);
            _proxy.Dispose();
            distr.Dispose();
        }
Example #2
0
 public DistributorSystem(ServerId localfordb, ServerId localforproxy,
                          DistributorHashConfiguration distributorHashConfiguration,
                          QueueConfiguration queueConfiguration,
                          ConnectionConfiguration connectionConfiguration,
                          DistributorCacheConfiguration cacheConfiguration,
                          NetReceiverConfiguration receiverConfigurationForDb,
                          NetReceiverConfiguration receiverConfigurationForProxy,
                          TransactionConfiguration transactionConfiguration,
                          HashMapConfiguration hashMapConfiguration, AsyncTasksConfiguration pingConfig,
                          AsyncTasksConfiguration checkConfig, ConnectionTimeoutConfiguration connectionTimeoutConfiguration)
 {
     Contract.Requires(distributorHashConfiguration != null);
     Contract.Requires(_queueConfiguration != null);
     Contract.Requires(connectionConfiguration != null);
     Contract.Requires(cacheConfiguration != null);
     Contract.Requires(receiverConfigurationForDb != null);
     Contract.Requires(receiverConfigurationForProxy != null);
     Contract.Requires(transactionConfiguration != null);
     Contract.Requires(localfordb != null);
     Contract.Requires(localforproxy != null);
     Contract.Requires(hashMapConfiguration != null);
     Contract.Requires(pingConfig != null);
     Contract.Requires(checkConfig != null);
     _pingConfig  = pingConfig;
     _checkConfig = checkConfig;
     _connectionTimeoutConfiguration = connectionTimeoutConfiguration;
     _distributorHashConfiguration   = distributorHashConfiguration;
     _hashMapConfiguration           = hashMapConfiguration;
     _queueConfiguration             = queueConfiguration;
     _connectionConfiguration        = connectionConfiguration;
     _cacheConfiguration             = cacheConfiguration;
     _receiverConfigurationForDb     = receiverConfigurationForDb;
     _receiverConfigurationForProxy  = receiverConfigurationForProxy;
     _transactionConfiguration       = transactionConfiguration;
     _localfordb    = localfordb;
     _localforproxy = localforproxy;
 }
Example #3
0
        public DistributorApi(DistributorNetConfiguration netConfiguration,
                              DistributorConfiguration distributorConfiguration, CommonConfiguration commonConfiguration,
                              TimeoutConfiguration timeoutConfiguration)
        {
            Contract.Requires(netConfiguration != null);
            Contract.Requires(distributorConfiguration != null);
            Contract.Requires(commonConfiguration != null);
            Contract.Requires(timeoutConfiguration != null);

            var dbServer    = new ServerId(netConfiguration.Host, netConfiguration.PortForStorage);
            var proxyServer = new ServerId(netConfiguration.Host, netConfiguration.PortForProxy);

            var distrHash  = new DistributorHashConfiguration(distributorConfiguration.CountReplics);
            var queue      = new QueueConfiguration(commonConfiguration.CountThreads, commonConfiguration.QueueSize);
            var connection = new ConnectionConfiguration(netConfiguration.WcfServiceName,
                                                         netConfiguration.CountConnectionsToSingleServer);
            var distrCache = new DistributorCacheConfiguration(distributorConfiguration.DataAliveTime,
                                                               distributorConfiguration.DataAliveAfterUpdate);
            var dbNetReceive = new NetReceiverConfiguration(netConfiguration.PortForStorage,
                                                            netConfiguration.Host, netConfiguration.WcfServiceName);
            var proxyNetReceive = new NetReceiverConfiguration(netConfiguration.PortForProxy,
                                                               netConfiguration.Host, netConfiguration.WcfServiceName);
            var transaction = new TransactionConfiguration(commonConfiguration.CountThreads);
            var hashMap     = new HashMapConfiguration(distributorConfiguration.FileWithHashName,
                                                       HashMapCreationMode.ReadFromFile, 1,
                                                       distributorConfiguration.CountReplics, HashFileType.Distributor);
            var asyncPing  = new AsyncTasksConfiguration(distributorConfiguration.PingPeriod);
            var asyncCheck = new AsyncTasksConfiguration(distributorConfiguration.CheckPeriod);
            var timeou     = new ConnectionTimeoutConfiguration(timeoutConfiguration.OpenTimeout,
                                                                timeoutConfiguration.SendTimeout);

            _distributorSystem = new DistributorSystem(dbServer, proxyServer, distrHash, queue, connection, distrCache,
                                                       dbNetReceive, proxyNetReceive, transaction, hashMap, asyncPing, asyncCheck, timeou);

            _handler = new DistributorHandler(_distributorSystem);
        }
Example #4
0
        public void ProxyAndDistributor_Read_DirectReadFromTwoServer_TwoReplics_LongRead()
        {
            const int storageServer1      = 22281;
            const int storageServer2      = 22282;
            const int distrServerForProxy = 23283;
            const int distrServerForDb    = 22283;

            var writer =
                new HashWriter(new HashMapConfiguration("TestProxyAndDistributorRead2Servers2ReplicsFullLongRead",
                                                        HashMapCreationMode.CreateNew, 2, 3, HashFileType.Distributor));

            writer.CreateMap();
            writer.SetServer(0, "localhost", storageServer1, 157);
            writer.SetServer(1, "localhost", storageServer2, 157);
            writer.Save();

            var dhc        = new DistributorHashConfiguration(2);
            var queue      = new QueueConfiguration(1, 100);
            var connection = new ConnectionConfiguration("testService", 10);
            var dcc        = new DistributorCacheConfiguration(TimeSpan.FromMilliseconds(600), TimeSpan.FromMilliseconds(1000));
            var ndrc       = new NetReceiverConfiguration(distrServerForDb, "localhost", "testService");
            var ndrc12     = new NetReceiverConfiguration(distrServerForProxy, "localhost", "testService");

            var distr = new DistributorSystem(new ServerId("localhost", distrServerForDb),
                                              new ServerId("localhost", distrServerForProxy),
                                              dhc, queue, connection, dcc, ndrc, ndrc12,
                                              new TransactionConfiguration(1),
                                              new HashMapConfiguration("TestProxyAndDistributorRead2Servers2ReplicsFullLongRead",
                                                                       HashMapCreationMode.ReadFromFile, 1, 2, HashFileType.Distributor),
                                              new AsyncTasksConfiguration(TimeSpan.FromSeconds(2)),
                                              new AsyncTasksConfiguration(TimeSpan.FromSeconds(2)),
                                              new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout));

            var server = new ServerId("localhost", distrServerForProxy);

            var storage1 = new WriterSystem(new ServerId("localhost", storageServer1), queue,
                                            new NetReceiverConfiguration(storageServer1, "localhost", "testService")
                                            , new NetReceiverConfiguration(1, "fake", "fake"),
                                            new HashMapConfiguration("TestProxyAndDistributorRead2Servers2ReplicsFullLongRead",
                                                                     HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Writer),
                                            connection, new RestoreModuleConfiguration(10, new TimeSpan()),
                                            new RestoreModuleConfiguration(10, new TimeSpan()),
                                            new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout),
                                            new RestoreModuleConfiguration(-1, TimeSpan.FromHours(1), false, TimeSpan.FromHours(1)));

            var storage2 = new WriterSystem(new ServerId("localhost", storageServer2), queue,
                                            new NetReceiverConfiguration(storageServer2, "localhost", "testService")
                                            , new NetReceiverConfiguration(1, "fake", "fake"),
                                            new HashMapConfiguration("TestProxyAndDistributorRead2Servers2ReplicsFullLongRead",
                                                                     HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Writer),
                                            connection, new RestoreModuleConfiguration(10, new TimeSpan()),
                                            new RestoreModuleConfiguration(10, new TimeSpan()),
                                            new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout),
                                            new RestoreModuleConfiguration(-1, TimeSpan.FromHours(1), false, TimeSpan.FromHours(1)));

            storage1.Build();
            storage2.Build();
            distr.Build();

            storage1.DbModule.AddDbModule(new TestDbInMemory());
            storage2.DbModule.AddDbModule(new TestDbInMemory());

            _proxy.Start();
            distr.Start();

            _proxy.Distributor.SayIAmHere(server);

            var api = _proxy.CreateApi("Int", false, new IntHashConvertor());

            var task = api.CreateSync(10, 10);

            task.Wait();

            storage1.Start();
            storage2.Start();

            Thread.Sleep(TimeSpan.FromMilliseconds(4000));

            task = api.CreateSync(10, 10);
            task.Wait();
            Assert.AreEqual(TransactionState.Complete, task.Result.State);

            UserTransaction transaction;

            var data = api.Read(10, out transaction);

            Assert.AreEqual(10, data);

            _proxy.Dispose();
            distr.Dispose();
            storage1.Dispose();
            storage2.Dispose();
        }
Example #5
0
        public void ProxyAndDistributor_Create_WriterMock()
        {
            var writer = new HashWriter(new HashMapConfiguration("test5", HashMapCreationMode.CreateNew, 1, 3, HashFileType.Collector));

            writer.CreateMap();
            writer.SetServer(0, "localhost", 21181, 157);
            writer.Save();

            var dhc        = new DistributorHashConfiguration(1);
            var queue      = new QueueConfiguration(1, 100);
            var connection = new ConnectionConfiguration("testService", 10);
            var dcc        = new DistributorCacheConfiguration(TimeSpan.FromMilliseconds(600), TimeSpan.FromMilliseconds(1000));
            var ndrc       = new NetReceiverConfiguration(22222, "localhost", "testService");
            var ndrc12     = new NetReceiverConfiguration(23222, "localhost", "testService");

            var distr = new DistributorSystem(new ServerId("localhost", 22222),
                                              new ServerId("localhost", 23222),
                                              dhc, queue, connection, dcc, ndrc, ndrc12,
                                              new TransactionConfiguration(1),
                                              new HashMapConfiguration("test5", HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Distributor),
                                              new AsyncTasksConfiguration(TimeSpan.FromMilliseconds(200)),
                                              new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                              new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout));

            var server = new ServerId("localhost", 23222);

            try
            {
                distr.Build();

                _proxy.Start();
                distr.Start();

                GlobalQueue.Queue.Start();

                _proxy.Distributor.SayIAmHere(server);

                var api = _proxy.CreateApi("", false, new StoredDataHashCalculator());

                var transaction = api.Create(10, TestHelper.CreateStoredData(10));
                Assert.IsNotNull(transaction);
                Thread.Sleep(200);
                transaction = _proxy.GetTransaction(transaction);
                Assert.IsNotNull(transaction);
                Assert.AreEqual(TransactionState.TransactionInProcess, transaction.State);
                Thread.Sleep(1000);
                transaction = _proxy.GetTransaction(transaction);
                Assert.IsNotNull(transaction);
                Assert.AreEqual(TransactionState.DontExist, transaction.State);

                var server1   = new ServerId("localhost", 21181);
                var netconfig = new ConnectionConfiguration("testService", 1);
                TestHelper.OpenWriterHost(server1, netconfig);

                Thread.Sleep(TimeSpan.FromMilliseconds(1000));

                transaction = api.Create(11, TestHelper.CreateStoredData(11));
                Assert.IsNotNull(transaction);
                Thread.Sleep(200);
                transaction = _proxy.GetTransaction(transaction);
                GlobalQueue.Queue.TransactionQueue.Add(new Transaction(transaction));
                Thread.Sleep(100);
                transaction = _proxy.GetTransaction(transaction);
                Assert.IsNotNull(transaction);
                if (transaction.State == TransactionState.TransactionInProcess)
                {
                    Thread.Sleep(100);
                    transaction = _proxy.GetTransaction(transaction);
                }
                Assert.AreEqual(TransactionState.Complete, transaction.State);
                Thread.Sleep(1000);
                transaction = _proxy.GetTransaction(transaction);
                Assert.IsNotNull(transaction);
                Assert.AreEqual(TransactionState.DontExist, transaction.State);
            }
            finally
            {
                _proxy.Dispose();
                distr.Dispose();
            }
        }
Example #6
0
        public void ProxyAndDistributor_Read_DirectReadFromOneServer()
        {
            const int storageServer1      = 22462;
            const int distrServerForProxy = 23263;
            const int distrServerForDb    = 22263;

            var writer = new HashWriter(new HashMapConfiguration("TestProxyAndDistributorRead1ServerFull", HashMapCreationMode.CreateNew, 1, 3, HashFileType.Distributor));

            writer.CreateMap();
            writer.SetServer(0, "localhost", storageServer1, 157);
            writer.Save();

            var dhc        = new DistributorHashConfiguration(1);
            var queue      = new QueueConfiguration(1, 100);
            var connection = new ConnectionConfiguration("testService", 10);
            var dcc        = new DistributorCacheConfiguration(TimeSpan.FromMilliseconds(600), TimeSpan.FromMilliseconds(1000));
            var ndrc       = new NetReceiverConfiguration(distrServerForDb, "localhost", "testService");
            var ndrc12     = new NetReceiverConfiguration(distrServerForProxy, "localhost", "testService");

            var distr = new DistributorSystem(new ServerId("localhost", distrServerForDb),
                                              new ServerId("localhost", distrServerForProxy),
                                              dhc, queue, connection, dcc, ndrc, ndrc12,
                                              new TransactionConfiguration(1),
                                              new HashMapConfiguration("TestProxyAndDistributorRead1ServerFull",
                                                                       HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Distributor),
                                              new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                              new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                              new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout));

            var server = new ServerId("localhost", distrServerForProxy);

            var storage = new WriterSystem(new ServerId("localhost", storageServer1), queue,
                                           new NetReceiverConfiguration(storageServer1, "localhost", "testService")
                                           , new NetReceiverConfiguration(1, "fake", "fake"),
                                           new HashMapConfiguration("TestProxyAndDistributorRead1ServerFull",
                                                                    HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Writer),
                                           connection, new RestoreModuleConfiguration(10, new TimeSpan()),
                                           new RestoreModuleConfiguration(10, new TimeSpan()),
                                           new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout),
                                           new RestoreModuleConfiguration(-1, TimeSpan.FromHours(1), false, TimeSpan.FromHours(1)));

            storage.Build();
            distr.Build();

            storage.DbModule.AddDbModule(new TestDbInMemory());

            storage.Start();
            _proxy.Start();
            distr.Start();

            GlobalQueue.Queue.Start();

            _proxy.Distributor.SayIAmHere(server);

            const int count = 50;

            var api = _proxy.CreateApi("Int", false, new IntHashConvertor());

            for (int i = 1; i < count; i++)
            {
                var task = api.CreateSync(i, i);
                task.Wait();
                Assert.AreEqual(TransactionState.Complete, task.Result.State);
            }

            for (int i = 1; i < count; i++)
            {
                UserTransaction transaction;
                var             read = (int)api.Read(i, out transaction);

                Assert.AreEqual(i, read);
            }

            _proxy.Dispose();
            distr.Dispose();
            storage.Dispose();
        }
Example #7
0
        public void ProxyAndDistributor_Create_WriterMock_TwoReplics()
        {
            var writer = new HashWriter(new HashMapConfiguration("test3", HashMapCreationMode.CreateNew, 2, 3, HashFileType.Writer));

            writer.CreateMap();
            writer.SetServer(0, "localhost", 21191, 157);
            writer.SetServer(1, "localhost", 21192, 157);
            writer.Save();

            writer = new HashWriter(new HashMapConfiguration("test4", HashMapCreationMode.CreateNew, 2, 3, HashFileType.Writer));
            writer.CreateMap();
            writer.SetServer(0, "localhost", 21193, 157);
            writer.SetServer(1, "localhost", 21192, 157);
            writer.Save();

            var dhc        = new DistributorHashConfiguration(2);
            var queue      = new QueueConfiguration(1, 100);
            var connection = new ConnectionConfiguration("testService", 10);
            var dcc        = new DistributorCacheConfiguration(TimeSpan.FromMilliseconds(400), TimeSpan.FromMilliseconds(1000));
            var ndrc       = new NetReceiverConfiguration(22223, "localhost", "testService");
            var ndrc12     = new NetReceiverConfiguration(23223, "localhost", "testService");
            var ndrc2      = new NetReceiverConfiguration(22224, "localhost", "testService");
            var ndrc22     = new NetReceiverConfiguration(23224, "localhost", "testService");

            var distr = new DistributorSystem(new ServerId("localhost", 22223),
                                              new ServerId("localhost", 23223),
                                              dhc, queue, connection, dcc, ndrc, ndrc12,
                                              new TransactionConfiguration(1),
                                              new HashMapConfiguration("test3", HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Distributor),
                                              new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                              new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                              new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout));
            var distr2 = new DistributorSystem(new ServerId("localhost", 22224),
                                               new ServerId("localhost", 23224),
                                               dhc, queue, connection, dcc, ndrc2, ndrc22,
                                               new TransactionConfiguration(1),
                                               new HashMapConfiguration("test4", HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Distributor),
                                               new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                               new AsyncTasksConfiguration(TimeSpan.FromMinutes(5)),
                                               new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout));


            var ser  = new ServerId("localhost", 23223);
            var ser2 = new ServerId("localhost", 23224);

            try
            {
                distr.Build();
                distr2.Build();

                _proxy.Start();
                distr.Start();
                distr2.Start();

                _proxy.Distributor.SayIAmHere(ser);
                _proxy.Distributor.SayIAmHere(ser2);

                var server1   = new ServerId("localhost", 21191);
                var server2   = new ServerId("localhost", 21192);
                var server3   = new ServerId("localhost", 21193);
                var netconfig = new ConnectionConfiguration("testService", 1);
                var s1        = TestHelper.OpenWriterHost(server1, netconfig);
                var s2        = TestHelper.OpenWriterHost(server2, netconfig);
                var s3        = TestHelper.OpenWriterHost(server3, netconfig);

                Thread.Sleep(TimeSpan.FromMilliseconds(300));

                var api = _proxy.CreateApi("", false, new StoredDataHashCalculator());

                api.Create(10, TestHelper.CreateStoredData(10));
                api.Create(11, TestHelper.CreateStoredData(11));
                Thread.Sleep(TimeSpan.FromMilliseconds(1000));
                Assert.AreEqual(1, s1.Value);
                Assert.AreEqual(2, s2.Value);
                Assert.AreEqual(1, s3.Value);
            }
            finally
            {
                _proxy.Dispose();
                distr.Dispose();
                distr2.Dispose();
            }
        }
Example #8
0
        public void ClientProxy_CrudOperations()
        {
            const int distrServer1  = 22206;
            const int distrServer12 = 22207;
            const int storageServer = 22208;

            #region hell

            var writer = new HashWriter(new HashMapConfiguration("TestClientProxy", HashMapCreationMode.CreateNew, 1, 1, HashFileType.Distributor));
            writer.CreateMap();
            writer.SetServer(0, "localhost", storageServer, 157);
            writer.Save();

            var distrHash    = new DistributorHashConfiguration(1);
            var queue        = new QueueConfiguration(1, 100);
            var connection   = new ConnectionConfiguration("testService", 10);
            var distrCache   = new DistributorCacheConfiguration(TimeSpan.FromMilliseconds(10000), TimeSpan.FromMilliseconds(1000000));
            var netReceive1  = new NetReceiverConfiguration(distrServer1, "localhost", "testService");
            var netReceive12 = new NetReceiverConfiguration(distrServer12, "localhost", "testService");
            var trans        = new TransactionConfiguration(1);
            var hashMap      = new HashMapConfiguration("TestClientProxy", HashMapCreationMode.ReadFromFile, 1, 1, HashFileType.Writer);
            var async        = new AsyncTasksConfiguration(TimeSpan.FromSeconds(10));

            var distr = new DistributorSystem(new ServerId("localhost", distrServer1),
                                              new ServerId("localhost", distrServer12),
                                              distrHash, queue, connection, distrCache, netReceive1, netReceive12, trans,
                                              new HashMapConfiguration("TestClientProxy", HashMapCreationMode.ReadFromFile, 1, 1,
                                                                       HashFileType.Distributor), async, async,
                                              new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout));

            var netReceivedb = new NetReceiverConfiguration(storageServer, "localhost", "testService");
            var restore      = new RestoreModuleConfiguration(4, TimeSpan.FromMinutes(1));

            var storage = new WriterSystem(new ServerId("localhost", storageServer), queue,
                                           netReceivedb, new NetReceiverConfiguration(1, "fake", "fake"), hashMap, connection, restore, restore,
                                           new ConnectionTimeoutConfiguration(Consts.OpenTimeout, Consts.SendTimeout),
                                           new RestoreModuleConfiguration(-1, TimeSpan.FromHours(1), false, TimeSpan.FromHours(1)));

            #endregion

            distr.Build();
            distr.Start();

            _proxy.Int.SayIAmHere("localhost", distrServer12);

            storage.Build();
            storage.DbModule.AddDbModule(new TestDbInMemory());
            storage.Start();

            const int count = 50;

            for (int i = 0; i < count; i++)
            {
                var state = _proxy.Int.CreateSync(i, i);
                Assert.AreEqual(RequestState.Complete, state.State);
            }

            for (int i = 0; i < count; i++)
            {
                RequestDescription description;
                var read = _proxy.Int.Read(i, out description);

                Assert.AreEqual(i, read);
                Assert.AreEqual(RequestState.Complete, description.State);
            }

            for (int i = 0; i < count; i++)
            {
                var state = _proxy.Int.DeleteSync(i);
                Assert.AreEqual(RequestState.Complete, state.State);
            }

            for (int i = 0; i < count; i++)
            {
                RequestDescription description;
                _proxy.Int.Read(i, out description);

                Assert.AreEqual(RequestState.DataNotFound, description.State);
            }

            distr.Dispose();
            storage.Dispose();
        }