You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/09/14 09:14:07 UTC

[GitHub] [incubator-opendal] Xuanwo opened a new issue, #3066: Behavior Test Framework for Bindings

Xuanwo opened a new issue, #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066

   OpenDAL's behavior test greatly enhances the stability and reliability of the openal rust core. I used to think bindings can use rust core directly and don't need to perform their own test frameworks. However, some users blocked by binding issues, for example: https://github.com/apache/incubator-opendal/issues/3037
   
   So I think it's better to build a behavior test framework for all bindings instead. This test framework should reuse all our existing setup and workflows as much as possible. And our binding should only need to implement test case once and can run upon different services.
   
   ## Design
   
   - Binding read `.env` like `core` does to init different services.
   - Binding implement behavior test like `core` does, for example, write a file and read it.
   
   ## Tasks
   
   - [ ] Move all `fixtures` from `core/src/services/{service}` to top-level `fixtures/{service}`
   - [ ] Java
     - [ ] Implement functions to read `.env` (and env) to init operator
     - [ ] Implement `test_write` / `test_read`
     - [ ] Add java test in `service_test_s3.yml`
   - [ ] Python
     - [ ] Implement functions to read `.env` (and env) to init operator
     - [ ] Implement `test_write` / `test_read`
     - [ ] Add python test in `service_test_s3.yml`
   - [ ] Node.js
     - [ ] Implement functions to read `.env` (and env) to init operator
     - [ ] Implement `test_write` / `test_read`
     - [ ] Add node.js test in `service_test_s3.yml`
   - [ ] Remove Cucumber based BDD Test
   
   Other bindings can follow those work based on their own progress.
   
   ## Notes
   
   This issue is only for bootstrapping the test framework. We will create separate tracking issues for different bindings to continue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Behavior Test Framework for Bindings [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1751916966

   > I'd like to try the Python part and I found that already has a behavior test based on memory, should I update it to the s3 service?
   
   The old behavior test will be replaced with the new test framework mentioned here. In the new test framework, we will:
   
   - reading `.env` files to bootstrap different test services.
   - support running tests based on service and test names.
   - implement tests like what we do in rust core and java binding.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Behavior Test Framework for Bindings [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #3066: Behavior Test Framework for Bindings
URL: https://github.com/apache/incubator-opendal/issues/3066


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #3066: Behavior Test Framework for Bindings

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1720439264

   > And should I complete the migration first?
   
   Cool, welcome to do this!
   
   > May I have a try of `java`?
   
   Welcome! @tisonkun oversees the Java binding. Feel free to engage him in discussion or open a new issue if necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Behavior Test Framework for Bindings [incubator-opendal]

Posted by "eryue0220 (via GitHub)" <gi...@apache.org>.
eryue0220 commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1759680646

   I'd like to solve the Node.js part. Can I have a tried?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] tisonkun commented on issue #3066: Behavior Test Framework for Bindings

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1719105531

   How do the variables in `.env` used? I don't find usage of those variables like `OPENDAL_AZBLOB_CONTAINER`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Behavior Test Framework for Bindings [incubator-opendal]

Posted by "suyanhanx (via GitHub)" <gi...@apache.org>.
suyanhanx commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1759685042

   > I'd like to solve the Node.js part. Can I have a try?
   
   Welcome!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Behavior Test Framework for Bindings [incubator-opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1862056672

   Most work has been done. Let's close.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] G-XD commented on issue #3066: Behavior Test Framework for Bindings

Posted by "G-XD (via GitHub)" <gi...@apache.org>.
G-XD commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1720437989

   May I have a try of `java`? And should I complete the migration first?
   
   > Move all fixtures from core/src/services/{service} to top-level fixtures/{service}
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #3066: Behavior Test Framework for Bindings

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1719135190

   > How do the variables in `.env` used? I don't find usage of those variables like `OPENDAL_AZBLOB_CONTAINER`.
   
   All variables in .env are treated as `OPENDAL_{service}_{key}`. Implementor should extract all `OPENDAL_{service}_{key} = {value}` to a `HashMap` and than passing to `Operator::from_map()` (based on binding's own API).
   
   The rust implementation could be found here:
   
   https://github.com/apache/incubator-opendal/blob/12bd7677462847f86714e311c098578912204859/core/tests/behavior/utils.rs#L48-L77
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Behavior Test Framework for Bindings [incubator-opendal]

Posted by "laipz8200 (via GitHub)" <gi...@apache.org>.
laipz8200 commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1751910942

   I'd like to try the Python part and I found that already has a behavior test based on memory, should I update it to the s3 service?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Behavior Test Framework for Bindings [incubator-opendal]

Posted by "suyanhanx (via GitHub)" <gi...@apache.org>.
suyanhanx commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1751912609

   > I'd like to try the Python part and I found that already has a behavior test based on memory, should I update it to the s3 service?
   
    The behavioral tests mentioned in this issue are not quite the same as the parts we did before. The new tests will be a bit closer to real-world usage.
   The test in Java may give you some help as an example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #3066: Behavior Test Framework for Bindings

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1719086939

   cc @tisonkun @messense @suyanhanx for comments.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] tisonkun commented on issue #3066: Behavior Test Framework for Bindings

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #3066:
URL: https://github.com/apache/incubator-opendal/issues/3066#issuecomment-1731181974

   FYI - The Java part is completed. Thanks to @G-XD's work.
   
   TODO list is updated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org