Beispiel #1
0
        public static void DropTestDatabase()
        {
            var retry = 2;

            do
            {
                try
                {
                    if (_server.DatabaseExist(GlobalTestDatabaseName, GlobalTestDatabaseStorageType))
                    {
                        _server.DropDatabase(GlobalTestDatabaseName, GlobalTestDatabaseStorageType);
                    }
                    break;
                }
                catch
                {
                    _server.Dispose();
                    _server = new OServer(_hostname, _port, _rootUserName, _rootUserParssword);
                }
                Thread.Sleep(100);
            }while (--retry > 0);

            if (_server.DatabaseExist(GlobalTestDatabaseName, GlobalTestDatabaseStorageType))
            {
                Assert.True(false, "Cannot drop test database.");
            }
        }
        public void DropTestDatabase()
        {
            var retry = 2;

            do
            {
                try
                {
                    if (_server.DatabaseExist(GlobalTestDatabaseName, GlobalTestDatabaseStorageType))
                    {
                        _server.DropDatabase(GlobalTestDatabaseName, GlobalTestDatabaseStorageType);
                    }
                    break;
                }
                catch
                {
                    _server.Dispose();
                    _server = new OServer(_hostname, port, _rootUserName, _rootUserParssword);
                }
            }while (--retry > 0);
        }