public void Run(JsonDrivenTestCase testCase) { using (var runner = new UnifiedTestRunner(loggerFactory: LoggerFactory)) { runner.Run(testCase); } }
public void Run(JsonDrivenTestCase testCase) { using (var runner = new UnifiedTestRunner()) { runner.Run(testCase); } }
public void Run(JsonDrivenTestCase testCase) { #if DEBUG RequirePlatform .Check() .SkipWhen(SupportedOperatingSystem.Linux) .SkipWhen(SupportedOperatingSystem.MacOS); // Make sure that LB is started. "nginx" is a LB we use for windows testing RequireEnvironment.Check().ProcessStarted("nginx"); Environment.SetEnvironmentVariable("MONGODB_URI", "mongodb://localhost:17017?loadBalanced=true"); Environment.SetEnvironmentVariable("MONGODB_URI_WITH_MULTIPLE_MONGOSES", "mongodb://localhost:17018?loadBalanced=true"); RequireServer .Check() .LoadBalancing(enabled: true, ignorePreviousSetup: true) .Authentication(authentication: false); // auth server requires credentials in connection string #else RequireEnvironment // these env variables are used only on the scripting side .Check() .EnvironmentVariable("SINGLE_MONGOS_LB_URI") .EnvironmentVariable("MULTI_MONGOS_LB_URI"); // EG currently supports LB only for Ubuntu RequirePlatform .Check() .SkipWhen(SupportedOperatingSystem.Windows) .SkipWhen(SupportedOperatingSystem.MacOS); #endif using (var runner = new UnifiedTestRunner()) { runner.Run(testCase); } }
private static (string EventsJson, string ResultsJson) ExecuteWorkload(string connectionString, BsonDocument driverWorkload, bool async, CancellationToken astrolabeCancellationToken) { Environment.SetEnvironmentVariable("MONGODB_URI", connectionString); // force using atlas connection string in our internal test connection strings var additionalArgs = new Dictionary <string, object>() { { "UnifiedLoopOperationCancellationToken", astrolabeCancellationToken } }; var eventFormatters = new Dictionary <string, IEventFormatter>() { { "events", new AstrolabeEventFormatter() } // "events" matches to the "storeEventsAsEntities.id" in the driverWorkload document }; using (var runner = new UnifiedTestRunner( allowKillSessions: false, additionalArgs: additionalArgs, eventFormatters: eventFormatters)) { var factory = new TestCaseFactory(); var testCase = factory.CreateTestCase(driverWorkload, async); runner.Run(testCase); Console.WriteLine("dotnet ExecuteWorkload> Returning..."); return(CreateWorkloadResult(entityMap: runner.EntityMap)); } }
public void Run(JsonDrivenTestCase testCase) { using (var runner = new UnifiedTestRunner()) { var exception = Record.Exception(() => runner.Run(testCase)); exception.Should().NotBeNull(); } }
public void Run(JsonDrivenTestCase testCase) { if (testCase.Name.Contains("mongos-unpin.json")) { throw new SkipException("Load balancer support not yet implemented."); } using (var runner = new UnifiedTestRunner()) { runner.Run(testCase); } }