File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
ManagedCode.Database.Tests/TestContainers Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,10 @@ public async Task InitializeAsync()
79
79
80
80
publicPort = containerListResponse . Ports . Single ( port => port . PrivatePort == privatePort ) . PublicPort ;
81
81
82
+ /*if(containerListResponse.State == "exited")
83
+ {
84
+ await _dockerClient.Containers.StartContainerAsync(containerId, new ContainerStartParameters());
85
+ }*/
82
86
}
83
87
84
88
_dbDatabase = new MongoDBDatabase ( new MongoDBOptions ( )
@@ -104,9 +108,13 @@ public async Task DisposeAsync()
104
108
105
109
public async void Dispose ( )
106
110
{
107
- await _dockerClient . Containers . StopContainerAsync ( containerId , new ContainerStopParameters ( ) ) ;
111
+ // await _dockerClient.Containers.StopContainerAsync(containerId, new ContainerStopParameters());
108
112
109
- await _dockerClient . Containers . RemoveContainerAsync ( containerId , new ContainerRemoveParameters ( ) ) ;
113
+ await _dockerClient . Containers . RemoveContainerAsync ( containerId ,
114
+ new ContainerRemoveParameters
115
+ {
116
+ Force = true
117
+ } ) ;
110
118
111
119
}
112
120
}
You can’t perform that action at this time.
0 commit comments