File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
projects/Test/Integration Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,25 @@ public override Task InitializeAsync()
61
61
Assert . Null ( _conn ) ;
62
62
Assert . Null ( _channel ) ;
63
63
64
- _toxiproxyManager = new ToxiproxyManager ( _testDisplayName , IsRunningInCI , IsWindows ) ;
65
- _proxyPort = ToxiproxyManager . ProxyPort ;
66
- return _toxiproxyManager . InitializeAsync ( ) ;
64
+ if ( AreToxiproxyTestsEnabled )
65
+ {
66
+ _toxiproxyManager = new ToxiproxyManager ( _testDisplayName , IsRunningInCI , IsWindows ) ;
67
+ _proxyPort = ToxiproxyManager . ProxyPort ;
68
+ return _toxiproxyManager . InitializeAsync ( ) ;
69
+ }
70
+ else
71
+ {
72
+ return Task . CompletedTask ;
73
+ }
67
74
}
68
75
69
76
public override async Task DisposeAsync ( )
70
77
{
71
- await _toxiproxyManager . DisposeAsync ( ) ;
78
+ if ( AreToxiproxyTestsEnabled )
79
+ {
80
+ await _toxiproxyManager . DisposeAsync ( ) ;
81
+ }
82
+
72
83
await base . DisposeAsync ( ) ;
73
84
}
74
85
You can’t perform that action at this time.
0 commit comments