Skip to content

Conversation

@zhuliquan
Copy link
Contributor

Which issue does this PR close?

Closes #11574.

Rationale for this change

fix failure running of case test_csv_parallel_one_col on windows machine

What changes are included in this PR?

getting file_size according to func metadata instead of target_os

Are these changes tested?

yes

Are there any user-facing changes?

no

@github-actions github-actions bot added the core Core DataFusion crate label Jul 20, 2024
20
};

let file_size = std::fs::metadata("tests/data/one_col.csv")?.len() as usize;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how this test is passing on CI? In theory we run these tests on CI:

https://github.com/apache/datafusion/actions/runs/10044145872/job/27758535504

but somehow this test does not appear to run 🤔

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zhuliquan -- this makes sense to me.

I don't understand how this issue isn't caught on the CI runner though

@zhuliquan
Copy link
Contributor Author

Thanks @zhuliquan -- this makes sense to me.

I don't understand how this issue isn't caught on the CI runner though

I also got confused, #[cfg(target_os)] not equal to windows?
I'am not sure that ci run unittests on real windows machine according to workflow yaml.

windows:
name: cargo test (win64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Rust toolchain
uses: ./.github/actions/setup-windows-builder
- name: Run tests (excluding doctests)
shell: bash
run: |
export PATH=$PATH:$HOME/d/protoc/bin
cargo test --lib --tests --bins --features avro,json,backtrace
cd datafusion-cli
cargo test --lib --tests --bins --all-features

@alamb
Copy link
Contributor

alamb commented Jul 23, 2024

I'am not sure that ci run unittests on real windows machine according to workflow yaml.

Or maybe it runs in WSL or something

@alamb alamb merged commit 5f0ab31 into apache:main Jul 23, 2024
@alamb
Copy link
Contributor

alamb commented Jul 23, 2024

Anyhow, thanks again @zhuliquan

@zhuliquan zhuliquan deleted the test_csv_parallel_one_col branch August 24, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

always failed test on datasource::file_format::csv::tests::test_csv_parallel_one_col::case_6 on windows machine

2 participants