This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch buffer-refactor
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/buffer-refactor by this push:
new b4f6c7af0 Disable r2 instead
b4f6c7af0 is described below
commit b4f6c7af08a6c5b199885703a4d9857a126aefb0
Author: Xuanwo <[email protected]>
AuthorDate: Tue Aug 22 18:01:35 2023 +0800
Disable r2 instead
Signed-off-by: Xuanwo <[email protected]>
---
.github/workflows/service_test_s3.yml | 66 ++++++++++++++++++-----------------
core/tests/behavior/write.rs | 55 ++++++++++++++---------------
2 files changed, 60 insertions(+), 61 deletions(-)
diff --git a/.github/workflows/service_test_s3.yml
b/.github/workflows/service_test_s3.yml
index a9760c11d..e066e375b 100644
--- a/.github/workflows/service_test_s3.yml
+++ b/.github/workflows/service_test_s3.yml
@@ -174,35 +174,37 @@ jobs:
OPENDAL_S3_ALLOW_ANONYMOUS: on
OPENDAL_S3_REGION: us-east-1
- r2:
- runs-on: ubuntu-latest
- if: github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork
- steps:
- - uses: actions/checkout@v3
- - name: Setup Rust toolchain
- uses: ./.github/actions/setup
- with:
- need-nextest: true
-
- - name: Load secret
- id: op-load-secret
- uses: 1password/load-secrets-action@v1
- with:
- export-env: true
- env:
- OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- OPENDAL_S3_TEST: op://services/r2/test
- OPENDAL_S3_BUCKET: op://services/r2/bucket
- OPENDAL_S3_ENDPOINT: op://services/r2/endpoint
- OPENDAL_S3_ACCESS_KEY_ID: op://services/r2/access_key_id
- OPENDAL_S3_SECRET_ACCESS_KEY: op://services/r2/secret_access_key
-
- - name: Test
- shell: bash
- working-directory: core
- run: cargo nextest run s3
- env:
- OPENDAL_S3_REGION: auto
- # This is the R2's limitation
- # Refer to
https://opendal.apache.org/docs/services/s3#compatible-services for more
information
- OPENDAL_S3_BATCH_MAX_OPERATIONS: 700
+# Disable this test until we addressed
https://github.com/apache/incubator-opendal/issues/2904
+#
+# r2:
+# runs-on: ubuntu-latest
+# if: github.event_name == 'push' ||
!github.event.pull_request.head.repo.fork
+# steps:
+# - uses: actions/checkout@v3
+# - name: Setup Rust toolchain
+# uses: ./.github/actions/setup
+# with:
+# need-nextest: true
+#
+# - name: Load secret
+# id: op-load-secret
+# uses: 1password/load-secrets-action@v1
+# with:
+# export-env: true
+# env:
+# OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
+# OPENDAL_S3_TEST: op://services/r2/test
+# OPENDAL_S3_BUCKET: op://services/r2/bucket
+# OPENDAL_S3_ENDPOINT: op://services/r2/endpoint
+# OPENDAL_S3_ACCESS_KEY_ID: op://services/r2/access_key_id
+# OPENDAL_S3_SECRET_ACCESS_KEY: op://services/r2/secret_access_key
+#
+# - name: Test
+# shell: bash
+# working-directory: core
+# run: cargo nextest run s3
+# env:
+# OPENDAL_S3_REGION: auto
+# # This is the R2's limitation
+# # Refer to
https://opendal.apache.org/docs/services/s3#compatible-services for more
information
+# OPENDAL_S3_BATCH_MAX_OPERATIONS: 700
diff --git a/core/tests/behavior/write.rs b/core/tests/behavior/write.rs
index d3a2207e6..ae8825984 100644
--- a/core/tests/behavior/write.rs
+++ b/core/tests/behavior/write.rs
@@ -87,8 +87,7 @@ pub fn behavior_write_tests(op: &Operator) -> Vec<Trial> {
test_writer_copy,
test_writer_abort,
test_writer_futures_copy,
- // Disable this test until we addressed
https://github.com/apache/incubator-opendal/issues/2904
- // test_fuzz_unsized_writer,
+ test_fuzz_unsized_writer,
test_invalid_reader_seek
)
}
@@ -1257,33 +1256,31 @@ pub async fn test_writer_futures_copy(op: Operator) ->
Result<()> {
}
/// Add test for unsized writer
-///
-/// Disable this test until we addressed
https://github.com/apache/incubator-opendal/issues/2904
-// pub async fn test_fuzz_unsized_writer(op: Operator) -> Result<()> {
-// if !op.info().full_capability().write_without_content_length {
-// warn!("{op:?} doesn't support write without content length, test
skip");
-// return Ok(());
-// }
-//
-// let path = uuid::Uuid::new_v4().to_string();
-//
-// let mut fuzzer = ObjectWriterFuzzer::new(&path, None);
-//
-// let mut w = op.writer_with(&path).buffer_size(8 * 1024 * 1024).await?;
-//
-// for _ in 0..100 {
-// match fuzzer.fuzz() {
-// ObjectWriterAction::Write(bs) => w.write(bs).await?,
-// }
-// }
-// w.close().await?;
-//
-// let content = op.read(&path).await?;
-// fuzzer.check(&content);
-//
-// op.delete(&path).await.expect("delete must succeed");
-// Ok(())
-// }
+pub async fn test_fuzz_unsized_writer(op: Operator) -> Result<()> {
+ if !op.info().full_capability().write_without_content_length {
+ warn!("{op:?} doesn't support write without content length, test
skip");
+ return Ok(());
+ }
+
+ let path = uuid::Uuid::new_v4().to_string();
+
+ let mut fuzzer = ObjectWriterFuzzer::new(&path, None);
+
+ let mut w = op.writer_with(&path).buffer_size(8 * 1024 * 1024).await?;
+
+ for _ in 0..100 {
+ match fuzzer.fuzz() {
+ ObjectWriterAction::Write(bs) => w.write(bs).await?,
+ }
+ }
+ w.close().await?;
+
+ let content = op.read(&path).await?;
+ fuzzer.check(&content);
+
+ op.delete(&path).await.expect("delete must succeed");
+ Ok(())
+}
/// seeking a negative position should return a InvalidInput error
pub async fn test_invalid_reader_seek(op: Operator) -> Result<()> {