Coder Social home page Coder Social logo

Comments (7)

xxchan avatar xxchan commented on September 26, 2024

I noticed there are both ci/scripts/run-backfill-tests.sh and src/tests/simulation/tests/integration_tests/backfill_tests.rs. This looks a little repetitive. Is this just to test in two different environments at the same time? Or are there any differences?

I'm thinking maybe we can use the same interface to write tests, and let it run in different environments. (i.e., support non-sim environment for the integration test. In other words, reuse Cluster, Configuration apis) @kwannoel @wangrunji0408 How do you think?

from risingwave.

xxchan avatar xxchan commented on September 26, 2024

Some aspects I want to improve

  • we can run tests easily both in CI and locally. (Should we utilize docker-compose or risedev?
  • we can use similar methods to setup tests, instead of writing shell scripts for each kind of tests..

from risingwave.

xxchan avatar xxchan commented on September 26, 2024

Thanks @BugenZhao 's idea

It can be as easy as

  • Write system commands in scripts for setup. Use env vars to specify ports
    • We can further write e.g., run_mysql.sh, which uses envvars. Then in slt, we reuse the script, and don't need to copy-paste ports.
  • The external services are started via risedev. Note that their env vars are stored in risedev-env. We use risedev slt to execute tests, which will load risedev-env first.
    • Ideally, CI can also use risedev to start services. But we can also just manually specify env vars.
    • optional: Maybe we can use docker-compose to start services.

from risingwave.

wangrunji0408 avatar wangrunji0408 commented on September 26, 2024

Generally I think it's a good idea to have a unified interface for both sim and non-sim env. Maybe risedev can be used as a backend for this API. But I'm not sure how much work it would take.

from risingwave.

BugenZhao avatar BugenZhao commented on September 26, 2024

Related #12451

from risingwave.

kwannoel avatar kwannoel commented on September 26, 2024

I noticed there are both ci/scripts/run-backfill-tests.sh and src/tests/simulation/tests/integration_tests/backfill_tests.rs. This looks a little repetitive. Is this just to test in two different environments at the same time? Or are there any differences?

I'm thinking maybe we can use the same interface to write tests, and let it run in different environments. (i.e., support non-sim environment for the integration test. In other words, reuse Cluster, Configuration apis) @kwannoel @wangrunji0408 How do you think?

Madsim's environment has some quirks. Running those tests in run-backfill-tests.sh is intentional, I don't want to execute them in madsim's environment.
For instance, time ticks randomly and depends on IO. So when there's sleep involved in the tests, I prefer to use a real-time environment, instead of one that is simulated.

from risingwave.

xxchan avatar xxchan commented on September 26, 2024

close in favor of #12451

from risingwave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.