示例#1
0
        public AzureRemindersTableTests()
        {
            TraceLogger.AddTraceLevelOverride("AzureTableDataManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("OrleansSiloInstanceManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);

            TestUtils.CheckForAzureStorage();
        }
示例#2
0
        public static void ClassInitialize(TestContext testContext)
        {
            TraceLogger.Initialize(new NodeConfiguration());
            TraceLogger.AddTraceLevelOverride("MySqlStatisticsPublisherTests", Severity.Verbose3);

            connectionString =
                RelationalStorageForTesting.SetupInstance(adoInvariant, testDatabaseName)
                .Result.CurrentConnectionString;
        }
        public new static void ClassInitialize(TestContext testContext)
        {
            MembershipTableTestsBase.ClassInitialize();
            TraceLogger.AddTraceLevelOverride("AzureTableDataManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("OrleansSiloInstanceManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);

            TestUtils.CheckForAzureStorage();
        }
            public static void ClassInitialize(TestContext testContext)
            {
                TraceLogger.Initialize(new NodeConfiguration());
                TraceLogger.AddTraceLevelOverride("MySqlRemindersTableTests", Logger.Severity.Verbose3);

                // Set shorter init timeout for these tests
                OrleansSiloInstanceManager.initTimeout = TimeSpan.FromSeconds(20);
                connectionString = RelationalStorageForTesting.SetupInstance(AdoNetInvariants.InvariantNameMySql, testDatabaseName).Result.CurrentConnectionString;
            }
        public static void ClassInitialize(TestContext testContext)
        {
            TraceLogger.Initialize(new NodeConfiguration());
            TraceLogger.AddTraceLevelOverride("SQLReminderTableTests", Logger.Severity.Verbose3);

            // Set shorter init timeout for these tests
            OrleansSiloInstanceManager.initTimeout = TimeSpan.FromSeconds(20);
            relationalStorage = SqlTestsEnvironment.Setup(testDatabaseName);
        }
示例#6
0
        public static void DoClassInitialize()
        {
            Console.WriteLine("ReminderTests ClassInitialize");

            ClientConfiguration cfg = ClientConfiguration.LoadFromFile("ClientConfigurationForTesting.xml");

            TraceLogger.Initialize(cfg);
#if DEBUG
            TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Reminder", Severity.Verbose3);
#endif
        }
        public static void ClassInitialize(TestContext testContext)
        {
            TraceLogger.Initialize(new NodeConfiguration());
            TraceLogger.AddTraceLevelOverride("AzureTableDataManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("OrleansSiloInstanceManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);

            // Set shorter init timeout for these tests
            OrleansSiloInstanceManager.initTimeout = TimeSpan.FromSeconds(20);

            UnitTestSiloHost.CheckForAzureStorage();
        }
示例#8
0
        public void DoTestInitialize()
        {
            ClientConfiguration cfg = ClientConfiguration.LoadFromFile("ClientConfigurationForTesting.xml");

            TraceLogger.Initialize(cfg);
#if DEBUG
            TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Reminder", Severity.Verbose3);
#endif
            log = TraceLogger.GetLogger(this.GetType().Name, TraceLogger.LoggerType.Application);
            Console.WriteLine("base.DoTestInitialize completed");
        }
示例#9
0
        public ReminderTests_Base(BaseClusterFixture fixture)
        {
            HostedCluster = fixture.HostedCluster;

            ClientConfiguration cfg = ClientConfiguration.LoadFromFile("ClientConfigurationForTesting.xml");

            TraceLogger.Initialize(cfg);
#if DEBUG
            TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Reminder", Severity.Verbose3);
#endif
            log = TraceLogger.GetLogger(this.GetType().Name, TraceLogger.LoggerType.Application);
        }
示例#10
0
        public void Logger_AddRemoveOverride()
        {
            const string name         = "LoggerOverrideTest";
            const string fullName     = "Runtime." + name;
            var          logger       = TraceLogger.GetLogger(name, TraceLogger.LoggerType.Runtime);
            var          initialLevel = logger.SeverityLevel;

            TraceLogger.AddTraceLevelOverride(fullName, Severity.Warning);
            Assert.AreEqual(Severity.Warning, logger.SeverityLevel, "Logger level not reset after override added");

            TraceLogger.RemoveTraceLevelOverride(fullName);
            Assert.AreEqual(initialLevel, logger.SeverityLevel, "Logger level not reset after override removed");
        }
示例#11
0
        public static void ClassInitialize(TestContext testContext)
        {
            hostName = Dns.GetHostName();
            logger   = TraceLogger.GetLogger("MembershipTablePluginTests", TraceLogger.LoggerType.Application);

            ClusterConfiguration cfg = new ClusterConfiguration();

            cfg.LoadFromFile("OrleansConfigurationForTesting.xml");
            TraceLogger.Initialize(cfg.GetOrAddConfigurationForNode("Primary"));

            TraceLogger.AddTraceLevelOverride("AzureTableDataManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("OrleansSiloInstanceManager", Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);
        }
示例#12
0
        public static void ClassInitialize(TestContext testContext)
        {
            TraceLogger.Initialize(new NodeConfiguration());
            TraceLogger.AddTraceLevelOverride("SQLMembershipTableTests", Logger.Severity.Verbose3);

            // Set shorter init timeout for these tests
            OrleansSiloInstanceManager.initTimeout = TimeSpan.FromSeconds(20);

            //Starts the storage emulator if not started already and it exists (i.e. is installed).
            if (!StorageEmulator.TryStart())
            {
                Console.WriteLine("Azure Storage Emulator could not be started.");
            }
        }
示例#13
0
        public static void ClassInitialize(TestContext testContext)
        {
            hostName = Dns.GetHostName();

            var cfg = new NodeConfiguration();

            TraceLogger.Initialize(cfg);

            TraceLogger.AddTraceLevelOverride("AzureTableDataManager", Logger.Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("OrleansSiloInstanceManager", Logger.Severity.Verbose3);
            TraceLogger.AddTraceLevelOverride("Storage", Logger.Severity.Verbose3);

            // Set shorter init timeout for these tests
            OrleansSiloInstanceManager.initTimeout = TimeSpan.FromSeconds(20);
        }
示例#14
0
        public static void ClassInitialize(TestContext testContext)
        {
            TraceLogger.AddTraceLevelOverride("RelationalStreamingTests", Severity.Verbose3);
            try
            {
                SqlServerStorage = RelationalStorageForTesting.SetupInstance(AdoNetInvariants.InvariantNameSqlServer, testDatabaseName).GetAwaiter().GetResult();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Failed to initialize SQL Server for RelationalGeneralTests: {0}", ex);
            }

            try
            {
                MySqlStorage = RelationalStorageForTesting.SetupInstance(AdoNetInvariants.InvariantNameMySql, testDatabaseName).GetAwaiter().GetResult();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Failed to initialize MySQL for RelationalGeneralTests: {0}", ex);
            }
        }
示例#15
0
        public static void ClassInitialize(TestContext testContext)
        {
            TraceLogger.Initialize(new NodeConfiguration());
            TraceLogger.AddTraceLevelOverride("SQLMembershipTableTests", Logger.Severity.Verbose3);

            // Set shorter init timeout for these tests
            OrleansSiloInstanceManager.initTimeout = TimeSpan.FromSeconds(20);

            Console.WriteLine("Initializing relational databases...");
            relationalStorage = RelationalStorageUtilities.CreateDefaultSqlServerStorageInstance();

            Console.WriteLine("Dropping and recreating database '{0}' with connectionstring '{1}'", testDatabaseName, relationalStorage.ConnectionString);
            if (relationalStorage.ExistsDatabaseAsync(testDatabaseName).Result)
            {
                relationalStorage.DropDatabaseAsync(testDatabaseName).Wait();
            }
            relationalStorage.CreateDatabaseAsync(testDatabaseName).Wait();

            //The old storage instance has the previous connection string, time have a new handle with a new connection string...
            relationalStorage = relationalStorage.CreateNewStorageInstance(testDatabaseName);

            Console.WriteLine("Creating database tables...");
            var creationScripts = RelationalStorageUtilities.RemoveBatchSeparators(File.ReadAllText("CreateOrleansTables_SqlServer.sql"));

            foreach (var creationScript in creationScripts)
            {
                var res = relationalStorage.ExecuteAsync(creationScript).Result;
            }

            //Currently there's only one database under test, SQL Server. So this as the other
            //setup is hardcoded here: putting the database in simple recovery mode.
            //This removes the use of recovery log in case of database crashes, which
            //improves performance to some degree, depending on usage. For non-performance testing only.
            var simpleModeRes = relationalStorage.ExecuteAsync(string.Format("ALTER DATABASE [{0}] SET RECOVERY SIMPLE;", testDatabaseName)).Result;

            Console.WriteLine("Initializing relational databases done.");
        }
 public SqlServerRemindersTableTests(ConnectionStringFixture fixture) : base(fixture)
 {
     TraceLogger.AddTraceLevelOverride(nameof(SqlServerRemindersTableTests), Severity.Verbose3);
 }
 public ZookeeperMembershipTableTests(ConnectionStringFixture fixture) : base(fixture)
 {
     TraceLogger.AddTraceLevelOverride(typeof(ZookeeperMembershipTableTests).Name, Severity.Verbose3);
 }
 public new static void ClassInitialize(TestContext testContext)
 {
     MembershipTableTestsBase.ClassInitialize();
     TraceLogger.AddTraceLevelOverride(typeof(SqlServerMembershipTableTests).Name, Severity.Verbose3);
 }
示例#19
0
 public ZookeeperMembershipTableTests()
 {
     TraceLogger.AddTraceLevelOverride(typeof(ZookeeperMembershipTableTests).Name, Severity.Verbose3);
 }
示例#20
0
 public AzureRemindersTableTests(ConnectionStringFixture fixture) : base(fixture)
 {
     TraceLogger.AddTraceLevelOverride("AzureTableDataManager", Severity.Verbose3);
     TraceLogger.AddTraceLevelOverride("OrleansSiloInstanceManager", Severity.Verbose3);
     TraceLogger.AddTraceLevelOverride("Storage", Severity.Verbose3);
 }
 public MySqlMembershipTableTests()
 {
     TraceLogger.AddTraceLevelOverride(typeof(MySqlMembershipTableTests).Name, Severity.Verbose3);
 }
示例#22
0
 public SqlServerRemindersTableTests()
 {
     TraceLogger.AddTraceLevelOverride(typeof(SqlServerRemindersTableTests).Name, Severity.Verbose3);
 }
 public new static void ClassInitialize(TestContext testContext)
 {
     ReminderTableTestsBase.ClassInitialize();
     TraceLogger.AddTraceLevelOverride(typeof(MySqlRemindersTableTests).Name, Severity.Verbose3);
 }