diff --git a/QCloudCSharpSDK/COSXMLTests/BucketTest.cs b/QCloudCSharpSDK/COSXMLTests/BucketTest.cs index 35ae491..158f6a7 100644 --- a/QCloudCSharpSDK/COSXMLTests/BucketTest.cs +++ b/QCloudCSharpSDK/COSXMLTests/BucketTest.cs @@ -1441,13 +1441,14 @@ public void testBucket() PutBucketACL(instance.cosXml, instance.bucketForBucketTest); GetBucketACL(instance.cosXml, instance.bucketForBucketTest); + DeleteBucketCORS(instance.cosXml, instance.bucketForBucketTest); + Thread.Sleep(300); PutBucketCORS(instance.cosXml, instance.bucketForBucketTest); Thread.Sleep(300); GetBucketCORS(instance.cosXml, instance.bucketForBucketTest); - DeleteBucketCORS(instance.cosXml, instance.bucketForBucketTest); PutBucketLifeCycle(instance.cosXml, instance.bucketForBucketTest); - Thread.Sleep(100); + Thread.Sleep(1000); GetBucketLifeCycle(instance.cosXml, instance.bucketForBucketTest); DeleteBucketLifeCycle(instance.cosXml, instance.bucketForBucketTest); @@ -1464,7 +1465,7 @@ public void testBucket() DeleteBucketPolicy(instance.cosXml, instance.bucketForBucketTest); - DeleteBucket(instance.cosXml, instance.bucketForBucketTest); + // DeleteBucket(instance.cosXml, instance.bucketForBucketTest); Assert.True(true); diff --git a/QCloudCSharpSDK/COSXMLTests/ObjectTest.cs b/QCloudCSharpSDK/COSXMLTests/ObjectTest.cs index ad12ba2..545f24e 100644 --- a/QCloudCSharpSDK/COSXMLTests/ObjectTest.cs +++ b/QCloudCSharpSDK/COSXMLTests/ObjectTest.cs @@ -1128,9 +1128,9 @@ public void testGetObjectByte() { QCloudServer instance = QCloudServer.Instance(); string key = "test.pdf"; - // string srcPath = QCloudServer.CreateFile(TimeUtils.GetCurrentTime(TimeUnit.SECONDS) + ".txt", 1024 * 1024 * 2); + string srcPath = QCloudServer.CreateFile(TimeUtils.GetCurrentTime(TimeUnit.SECONDS) + ".txt", 1024 * 1024 * 2); - // PutObject(instance.cosXml, instance.bucketForObjectTest, key, @srcPath); + PutObject(instance.cosXml, instance.bucketForObjectTest, key, @srcPath); try { @@ -1186,7 +1186,7 @@ public void testObject() PutObjectWithCustomerKey(instance.cosXml, instance.bucketForObjectTest, "customerKey_" + key, @srcPath); - PutObjectWithKMS(instance.cosXml, instance.bucketForObjectTest, "KMS" + key, @srcPath); + // PutObjectWithKMS(instance.cosXml, instance.bucketForObjectTest, "KMS" + key, @srcPath); HeadObject(instance.cosXml, instance.bucketForObjectTest, key); diff --git a/QCloudCSharpSDK/COSXMLTests/QCloudServer.cs b/QCloudCSharpSDK/COSXMLTests/QCloudServer.cs index ba5e773..eb49ebb 100644 --- a/QCloudCSharpSDK/COSXMLTests/QCloudServer.cs +++ b/QCloudCSharpSDK/COSXMLTests/QCloudServer.cs @@ -33,11 +33,11 @@ private QCloudServer() string secretId = Environment.GetEnvironmentVariable("COS_KEY"); string secretKey = Environment.GetEnvironmentVariable("COS_SECRET"); region = Environment.GetEnvironmentVariable("COS_REGION"); - bucketForBucketTest = "bucket-4-csharp-test"; - bucketForObjectTest = Environment.GetEnvironmentVariable("COS_BUCKET"); - if (bucketForObjectTest == null) { - bucketForObjectTest = "bucket-4-csharp-obj-test"; + bucketForBucketTest = Environment.GetEnvironmentVariable("COS_BUCKET"); + if (bucketForBucketTest == null) { + bucketForBucketTest = "bucket-4-csharp-test"; } + bucketForObjectTest = bucketForBucketTest; if (appid == null) {