public StreamTypeSerializationTests()
 {
     // FakeSerializer definied in ExternalSerializerTest.cs
     SerializationTestEnvironment.Initialize(new List <TypeInfo> {
         typeof(FakeSerializer).GetTypeInfo()
     });
 }
Beispiel #2
0
 public SQSAdapterTests(ITestOutputHelper output)
 {
     this.output       = output;
     this.deploymentId = MakeDeploymentId();
     LogManager.Initialize(new NodeConfiguration());
     BufferPool.InitGlobalBufferPool(new MessagingConfiguration(false));
     SerializationTestEnvironment.Initialize();
 }
Beispiel #3
0
        protected BaseClusterFixture()
        {
            TestDefaultConfiguration.InitializeDefaults();
            GrainClient.Uninitialize();
            SerializationTestEnvironment.Initialize();
            var hostedCluster = CreateClusterHost();

            this.HostedCluster = hostedCluster;
        }
 public RequestContextTests_Local()
 {
     SerializationTestEnvironment.Initialize();
     oldPropagateActivityId              = RequestContext.PropagateActivityId;
     RequestContext.PropagateActivityId  = true;
     Trace.CorrelationManager.ActivityId = Guid.Empty;
     RequestContext.Clear();
     headers.Clear();
     GrainClient.ClientInvokeCallback = null;
 }
        public MessageSerializerTests(ITestOutputHelper output)
        {
            this.output = output;
            MessagingStatisticsGroup.Init(false);

            var orleansConfig = ClusterConfiguration.LocalhostPrimarySilo();

            BufferPool.InitGlobalBufferPool(orleansConfig.Globals);

            SerializationTestEnvironment.Initialize();
        }
Beispiel #6
0
        public SerializationOrderTests()
        {
            FakeTypeToSerialize.Reset();
            FakeSerializer1.Reset();
            FakeSerializer2.Reset();
            SerializationTestEnvironment.Initialize(new List <TypeInfo> {
                typeof(FakeSerializer1).GetTypeInfo(), typeof(FakeSerializer2).GetTypeInfo()
            }, null);

            SerializationManager.Register(typeof(FakeTypeToSerialize), typeof(FakeTypeToSerialize));
        }
Beispiel #7
0
        /// <summary>
        /// Constructors -- Registers Orleans system performance counters, 
        /// plus any grain-specific activation conters that can be detected when this installer is run.
        /// </summary>
        public OrleansPerformanceCounterInstaller()
        {
            SerializationTestEnvironment.Initialize();
            Trace.Listeners.Clear();
            var cfg = new NodeConfiguration { TraceFilePattern = null, TraceToConsole = false };
            LogManager.Initialize(cfg);

            consumer = new OrleansPerfCounterTelemetryConsumer();

            if (GrainTypeManager.Instance == null)
            {
                var loader = new SiloAssemblyLoader(new Dictionary<string, SearchOption>());
                var typeManager = new GrainTypeManager(false, loader, new RandomPlacementDefaultStrategy());
                GrainTypeManager.Instance.Start(false);
            }
        }
Beispiel #8
0
        public int Run()
        {
            if (NeedRunAsAdministrator && !IsRunningAsAdministrator)
            {
                ConsoleText.WriteError("Need to be running in Administrator role to perform the requested operations.");
                return(1);
            }

            SerializationTestEnvironment.Initialize();

            InitConsoleLogging();

            try
            {
                if (Unregister)
                {
                    ConsoleText.WriteStatus("Unregistering Orleans performance counters with Windows");
                    UnregisterWindowsPerfCounters(this.BruteForce);
                }
                else
                {
                    ConsoleText.WriteStatus("Registering Orleans performance counters with Windows");
                    RegisterWindowsPerfCounters(true); // Always reinitialize counter registrations, even if already existed
                }

                ConsoleText.WriteStatus("Operation completed successfully.");
                return(0);
            }
            catch (Exception exc)
            {
                ConsoleText.WriteError("Error running " + typeof(CounterControl).GetTypeInfo().Assembly.GetName().Name + ".exe", exc);

                if (!BruteForce)
                {
                    return(2);
                }

                ConsoleText.WriteStatus("Ignoring error due to brute-force mode");
                return(0);
            }
        }
 public ILBasedExceptionSerializerTests()
 {
     this.environment = SerializationTestEnvironment.Initialize(null, typeof(ILBasedSerializer));
 }
Beispiel #10
0
 public DotNetSerializableTests()
 {
     this.environment = SerializationTestEnvironment.Initialize();
 }
Beispiel #11
0
 public DeepCopyTests()
 {
     SerializationTestEnvironment.Initialize();
 }
Beispiel #12
0
 public RuntimeCodeGenerationTests()
 {
     SerializationTestEnvironment.Initialize();
 }
Beispiel #13
0
 public ILSerializerTests()
 {
     SerializationTestEnvironment.Initialize();
 }
Beispiel #14
0
 public Identifiertests(ITestOutputHelper output)
 {
     this.output = output;
     SerializationTestEnvironment.Initialize();
     BufferPool.InitGlobalBufferPool(new MessagingConfiguration(false));
 }
Beispiel #15
0
 public ConsiderForCodeGenerationAttributeTests()
 {
     SerializationTestEnvironment.Initialize();
 }
Beispiel #16
0
 public SerializationTestsFsharpTypes()
 {
     SerializationTestEnvironment.Initialize();
 }
        public ILBasedExceptionSerializerTests()
        {
#pragma warning disable CS0618 // Type or member is obsolete
            this.environment = SerializationTestEnvironment.Initialize(null, typeof(ILBasedSerializer));
#pragma warning restore CS0618 // Type or member is obsolete
        }
Beispiel #18
0
 public GeneratorGrainTest()
 {
     SerializationTestEnvironment.Initialize();
 }
 public BondSerializationTests()
 {
     SerializationTestEnvironment.Initialize(new List <TypeInfo> {
         typeof(BondSerializer).GetTypeInfo()
     }, null);
 }
Beispiel #20
0
 public SerializerGenerationTests()
 {
     SerializationTestEnvironment.Initialize();
 }
 public ExternalSerializerTest()
 {
     SerializationTestEnvironment.Initialize(new List <TypeInfo> {
         typeof(FakeSerializer).GetTypeInfo()
     }, null);
 }
Beispiel #22
0
 public SerializationTestsImmutableCollections()
 {
     SerializationTestEnvironment.Initialize();
 }
Beispiel #23
0
 public SerializationTestsDifferentTypes()
 {
     SerializationTestEnvironment.Initialize();
 }
Beispiel #24
0
 /// <summary>
 /// Initializes the system for testing.
 /// </summary>
 public InternalSerializationTests()
 {
     SerializationTestEnvironment.Initialize();
 }
Beispiel #25
0
 public CustomSerializerTests()
 {
     LogManager.Initialize(new NodeConfiguration());
     SerializationTestEnvironment.Initialize();
 }
Beispiel #26
0
 public AssemblyLoaderTests()
 {
     SerializationTestEnvironment.Initialize();
 }