Skip to content

Commit cb79d9f

Browse files
committed
only use a generated database name in the test when one isn't specified on the connection string.
1 parent 785f030 commit cb79d9f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/MongoDB.Driver.Core.TestHelpers/CoreTestConfiguration.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ private static ConnectionString GetConnectionString()
171171

172172
private static DatabaseNamespace GetDatabaseNamespace()
173173
{
174+
if (!string.IsNullOrEmpty(__connectionString.DatabaseName))
175+
{
176+
return new DatabaseNamespace(__connectionString.DatabaseName);
177+
}
178+
174179
var timestamp = DateTime.Now.ToString("MMddHHmm");
175180
return new DatabaseNamespace("Tests" + timestamp);
176181
}

0 commit comments

Comments
 (0)