File tree 1 file changed +8
-1
lines changed
test/Core.IntegrationTest
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
- using System . Security . Cryptography ;
1
+ using System . Security . Cryptography ;
2
2
using System . Security . Cryptography . X509Certificates ;
3
3
using Bit . Core . Models . Mail ;
4
4
using Bit . Core . Platform . X509ChainCustomization ;
@@ -16,6 +16,7 @@ namespace Bit.Core.IntegrationTest;
16
16
17
17
public class MailKitSmtpMailDeliveryServiceTests
18
18
{
19
+ private static int _loggingConfigured ;
19
20
private readonly X509Certificate2 _selfSignedCert ;
20
21
21
22
public MailKitSmtpMailDeliveryServiceTests ( ITestOutputHelper testOutputHelper )
@@ -34,6 +35,12 @@ private static X509Certificate2 CreateSelfSignedCert(string commonName)
34
35
35
36
private static void ConfigureSmtpServerLogging ( ITestOutputHelper testOutputHelper )
36
37
{
38
+ // The logging in SmtpServer is configured statically so if we add it for each test it dyplicates
39
+ // but we cant add the logger statically either because we need ITestOutputHelper
40
+ if ( Interlocked . CompareExchange ( ref _loggingConfigured , 1 , 0 ) == 0 )
41
+ {
42
+ return ;
43
+ }
37
44
// Unfortunately this package doesn't public expose its logging infrastructure
38
45
// so we use private reflection to try and access it.
39
46
try
You can’t perform that action at this time.
0 commit comments