diff --git a/.github/workflows/reuse.linux.yml b/.github/workflows/reuse.linux.yml index 51695f7813311..d36c1d5bfefe1 100644 --- a/.github/workflows/reuse.linux.yml +++ b/.github/workflows/reuse.linux.yml @@ -275,26 +275,21 @@ jobs: with: name: test-stateful-standalone-linux - # Temporarily commented out, since this job is run on self-hosted, may - # bring troubles to other jobs run on self-hosted. - # - # Maybe we could patch `libfaketime` and let it support jemalloc? - # - # test_ee_standalone_fake_time: - # needs: [build, check] - # runs-on: [self-hosted, X64, Linux, 4c8g, "${{ inputs.runner_provider }}"] - # steps: - # - uses: actions/checkout@v4 - # - uses: ./.github/actions/setup_license - # with: - # runner_provider: ${{ inputs.runner_provider }} - # - uses: ./.github/actions/test_ee_standalone_fake_time_linux - # timeout-minutes: 10 - # - name: Upload failure - # if: failure() - # uses: ./.github/actions/artifact_failure - # with: - # name: test-stateful-standalone-fake-time-linux + test_ee_standalone_fake_time: + needs: [build, check] + runs-on: [self-hosted, X64, Linux, 4c8g, "${{ inputs.runner_provider }}"] + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup_license + with: + runner_provider: ${{ inputs.runner_provider }} + - uses: ./.github/actions/test_ee_standalone_fake_time_linux + timeout-minutes: 10 + - name: Upload failure + if: failure() + uses: ./.github/actions/artifact_failure + with: + name: test-stateful-standalone-fake-time-linux test_ee_management_mode: needs: [ build, check ] diff --git a/scripts/ci/ci-run-ee-tests-standalone-fake-time-minio.sh b/scripts/ci/ci-run-ee-tests-standalone-fake-time-minio.sh index 6cf8016da7d37..01882e8ba5fe0 100755 --- a/scripts/ci/ci-run-ee-tests-standalone-fake-time-minio.sh +++ b/scripts/ci/ci-run-ee-tests-standalone-fake-time-minio.sh @@ -21,8 +21,16 @@ export STORAGE_ALLOW_INSECURE=true echo "Install dependence" python3 -m pip install --quiet mysql-connector-python +echo "Build dateoffset" +git clone https://github.com/batiati/dateoffset +pushd dateoffset +make +popd + + echo "Starting standalone DatabendQuery(faked time: 2 days ago)" -sudo date -s "-2 days" +LD_PRELOAD=./dateoffset/dateoffset.so \ +DATE_OFFSET=$(date -d "-2 days" '+%s') \ ./scripts/ci/deploy/databend-query-standalone.sh SCRIPT_PATH="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)" @@ -32,8 +40,7 @@ echo "Preparing data (faked time)" ./databend-test --mode 'standalone' --run-dir 8_faked_time_prepare popd -echo "Starting standalone DatabendQuery" -sudo date -s "+2 days" +echo "Starting standalone DatabendQuery (Normal time)" ./scripts/ci/deploy/databend-query-standalone.sh pushd "$SCRIPT_PATH/../../tests" || exit