|
15 | 15 |
|
16 | 16 | using System;
|
17 | 17 | using System.Collections.Generic;
|
18 |
| -using System.IO; |
19 | 18 | using System.Linq;
|
20 | 19 | using System.Threading;
|
21 | 20 | using FluentAssertions;
|
|
37 | 36 | using Xunit;
|
38 | 37 | using Xunit.Abstractions;
|
39 | 38 |
|
40 |
| -namespace MongoDB.Driver.Specifications.server_discovery_and_monitoring |
| 39 | +namespace MongoDB.Driver.Tests.Specifications.server_discovery_and_monitoring |
41 | 40 | {
|
42 | 41 | public class ServerDiscoveryAndMonitoringTestRunner : LoggableTestClass
|
43 | 42 | {
|
@@ -602,14 +601,14 @@ private class TestCaseFactory : JsonDrivenTestCaseFactory
|
602 | 601 | // private constants
|
603 | 602 | private readonly string[] MonitoringPrefixes =
|
604 | 603 | {
|
605 |
| - "MongoDB.Driver.Core.Tests.Specifications.server_discovery_and_monitoring.tests.monitoring.", |
606 |
| - "MongoDB.Driver.Core.Tests.Specifications.server_discovery_and_monitoring.tests.legacy_hello.monitoring." |
| 604 | + "MongoDB.Driver.Tests.Specifications.server_discovery_and_monitoring.tests.monitoring.", |
| 605 | + "MongoDB.Driver.Tests.Specifications.server_discovery_and_monitoring.tests.legacy_hello.monitoring." |
607 | 606 | };
|
608 | 607 |
|
609 | 608 | // Integration tests are run by ServerDiscoveryAndMonitoringIntegrationTestRunner in MongoDB.Driver.Tests
|
610 |
| - private const string IntegrationTestPrefix = "MongoDB.Driver.Core.Tests.Specifications.server_discovery_and_monitoring.tests.integration."; |
| 609 | + private const string IntegrationTestPrefix = "MongoDB.Driver.Tests.Specifications.server_discovery_and_monitoring.tests.integration."; |
611 | 610 |
|
612 |
| - protected override string PathPrefix => "MongoDB.Driver.Core.Tests.Specifications.server_discovery_and_monitoring.tests."; |
| 611 | + protected override string PathPrefix => "MongoDB.Driver.Tests.Specifications.server_discovery_and_monitoring.tests."; |
613 | 612 |
|
614 | 613 | protected override IEnumerable<JsonDrivenTestCase> CreateTestCases(BsonDocument document)
|
615 | 614 | {
|
@@ -653,6 +652,11 @@ public static IConnectionPool _connectionPool(this Server server)
|
653 | 652 | return (IConnectionPool)Reflector.GetFieldValue(server, nameof(_connectionPool));
|
654 | 653 | }
|
655 | 654 |
|
| 655 | + public static IServerMonitor _monitor(this IServer server) |
| 656 | + { |
| 657 | + return (IServerMonitor)Reflector.GetFieldValue(server, nameof(_monitor)); |
| 658 | + } |
| 659 | + |
656 | 660 | public static void HandleBeforeHandshakeCompletesException(this Server server, Exception ex)
|
657 | 661 | {
|
658 | 662 | Reflector.Invoke(server, nameof(HandleBeforeHandshakeCompletesException), ex);
|
|
0 commit comments