command: implement graceful shutdown for mini cluster
- Introduce MiniClusterCtx to coordinate shutdown across mini services - Update Master, Volume, Filer, S3, and WebDAV servers to respect context cancellation - Ensure all resources are cleaned up properly during test teardown - Integrate MiniClusterCtx in s3tables integration tests
This commit is contained in:
@@ -319,8 +319,16 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
|
||||
stopChan <- true
|
||||
})
|
||||
|
||||
select {
|
||||
case <-stopChan:
|
||||
if MiniClusterCtx != nil {
|
||||
select {
|
||||
case <-stopChan:
|
||||
case <-MiniClusterCtx.Done():
|
||||
shutdown(publicHttpDown, clusterHttpServer, grpcS, volumeServer)
|
||||
}
|
||||
} else {
|
||||
select {
|
||||
case <-stopChan:
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user