Skip to content

Commit 46a0fd1

Browse files
authored
Skip dm integration tests on github actions (#21)
* fix * skip dm tests * fix package name
1 parent aa36c36 commit 46a0fd1

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ jobs:
5555
sudo apt-get update
5656
sudo apt-get install -y unixodbc unixodbc-dev
5757
58-
- name: Run cargo test
59-
run: cargo test
58+
- name: Run unit tests
59+
run: cargo test -p datafusion-remote-table
60+
61+
- name: Run integration tests
62+
# There is no easy way to install dm odbc driver, so skip dm integration tests
63+
run: cargo test -p integration_tests --test common --test sqlite --test postgres --test mysql --test oracle
6064

6165
lints:
6266
name: Lints

integration-tests/src/utils.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,15 @@ pub async fn wait_container_ready(database: RemoteDbType) {
9797

9898
let mut retry = 0;
9999
loop {
100-
if let Ok(_table) = RemoteTable::try_new(conn.clone(), "select 1").await {
101-
break;
102-
};
100+
match RemoteTable::try_new(conn.clone(), "select 1").await {
101+
Ok(_) => break,
102+
Err(err) => {
103+
eprintln!("Connection error: {err:?}");
104+
}
105+
}
103106
retry += 1;
104-
if retry > 50 {
105-
panic!("container still not ready after 500 seconds");
107+
if retry > 20 {
108+
panic!("container still not ready after 200 seconds");
106109
}
107110
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
108111
}

0 commit comments

Comments
 (0)