mirror of
https://github.com/versity/versitygw.git
synced 2026-04-29 16:56:56 +00:00
fix: fixes the context cancelation issue in Versioning_GetObject_success integration test.
Fixes #1271 In the `Versioning_GetObject_success` integration test the contexts are canceled before reading the full request body after `GetObject`. Changes the behaviour to defer the context cancelation, to be sure it's canceled after the full request body is read.
This commit is contained in:
@@ -16414,7 +16414,7 @@ func Versioning_GetObject_success(s *S3Conf) error {
|
||||
Key: &obj,
|
||||
VersionId: r.res.VersionId,
|
||||
})
|
||||
cancel()
|
||||
defer cancel()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -16438,7 +16438,7 @@ func Versioning_GetObject_success(s *S3Conf) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer out.Body.Close()
|
||||
out.Body.Close()
|
||||
|
||||
outCsum := sha256.Sum256(bdy)
|
||||
if outCsum != r.csum {
|
||||
@@ -16451,7 +16451,7 @@ func Versioning_GetObject_success(s *S3Conf) error {
|
||||
Bucket: &bucket,
|
||||
Key: &obj,
|
||||
})
|
||||
cancel()
|
||||
defer cancel()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -16475,7 +16475,7 @@ func Versioning_GetObject_success(s *S3Conf) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer out.Body.Close()
|
||||
out.Body.Close()
|
||||
|
||||
outCsum = sha256.Sum256(bdy)
|
||||
if outCsum != r.csum {
|
||||
|
||||
Reference in New Issue
Block a user