public static void ClassCleanup()
        {
            IComputeProvider provider = Bootstrapper.CreateComputeProvider();

            Stopwatch timer = Stopwatch.StartNew();

            Console.Write("  Deleting...");
            bool deleted = provider.DeleteServer(_server.Id);

            Assert.IsTrue(deleted);

            provider.WaitForServerDeleted(_server.Id);
            Console.Write("done. {0} seconds", timer.Elapsed.TotalSeconds);
        }
Пример #2
0
        public void CleanupTestServers()
        {
            IComputeProvider           provider = Bootstrapper.CreateComputeProvider();
            IEnumerable <SimpleServer> servers  = ListAllServers(provider).ToArray();

            foreach (SimpleServer server in servers)
            {
                if (string.IsNullOrEmpty(server.Name))
                {
                    continue;
                }

                if (!server.Name.StartsWith(UnitTestServerPrefix))
                {
                    continue;
                }

                Console.WriteLine("Deleting unit test server... {0} ({1})", server.Name, server.Id);
                bool deleted = provider.DeleteServer(server.Id);
                Assert.IsTrue(deleted);
                provider.WaitForServerDeleted(server.Id);
            }
        }