Skip to content

Commit

Permalink
Merge pull request #41 from IGinX-THU/fix_ut2
Browse files Browse the repository at this point in the history
remove sync test in ut
  • Loading branch information
iznauy authored Mar 13, 2023
2 parents f4b66e3 + 9ee5e11 commit 2753417
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/unit-mds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
"${GITHUB_WORKSPACE}/.github/zk.sh"
- name: Run Test For Meta Manager
run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false
- name: Run Test For Sync Protocol
run: mvn test -q -Dtest=ZooKeeperSyncProtocolTest -DfailIfNoTests=false
- uses: codecov/codecov-action@v1
with:
file: ./**/target/site/jacoco/jacoco.xml
Expand Down Expand Up @@ -72,6 +74,8 @@ jobs:
"${GITHUB_WORKSPACE}/.github/etcd.sh"
#- name: Run Test For Meta Manager
# run: mvn test -q -Dtest=IMetaManagerTest -DfailIfNoTests=false
- name: Run Test For Sync Protocol
run: mvn test -q -Dtest=ETCDSyncProtocolTest -DfailIfNoTests=false
- uses: codecov/codecov-action@v1
with:
file: ./**/target/site/jacoco/jacoco.xml
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,5 @@ jobs:
python-version: ${{ matrix.python-version }}
java: ${{ matrix.java }}

- name: Run ZooKeeper
uses: ./.github/actions/zookeeperRunner

- name: Run ETCD
uses: ./.github/actions/etcdRunner

- name: Test with Maven
run: mvn clean package -pl core -am
6 changes: 6 additions & 0 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
<artifactId>duckdb_jdbc</artifactId>
<version>0.5.1</version>
</dependency>
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<version>0.5.7</version>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand Down
6 changes: 6 additions & 0 deletions test/pom.xml.iotdb12
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
<artifactId>iginx-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<version>0.5.7</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-session</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.tsinghua.iginx.metadata.sync;
package cn.edu.tsinghua.iginx.integration.mds;

import cn.edu.tsinghua.iginx.metadata.sync.protocol.SyncProtocol;
import cn.edu.tsinghua.iginx.metadata.sync.protocol.etcd.ETCDSyncProtocolImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.tsinghua.iginx.metadata.sync;
package cn.edu.tsinghua.iginx.integration.mds;

import java.util.Random;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.tsinghua.iginx.metadata.sync;
package cn.edu.tsinghua.iginx.integration.mds;

import cn.edu.tsinghua.iginx.metadata.sync.proposal.ProposalListener;
import cn.edu.tsinghua.iginx.metadata.sync.proposal.SyncProposal;
Expand Down Expand Up @@ -94,7 +94,7 @@ public void end(String key) {
protocol.close();
}

@Test(timeout = 10000)
@Test(timeout = 20000)
public void testTwoNodeSingleDecision() throws Exception {
String category = RandomUtils.randomString(10);
String key = RandomUtils.randomString(5);
Expand Down Expand Up @@ -202,7 +202,7 @@ public void end(String key) {

}

@Test(timeout = 20000)
@Test(timeout = 30000)
public void testMultiNodeSingleDecision() throws Exception {
for (int c = 0; c < 1; c++) { // 随机 3-6个节点,测试10次
int N = RandomUtils.randomNumber(2, 4);
Expand Down Expand Up @@ -318,7 +318,7 @@ public void end(String key) {
}
}

@Test(timeout = 20000)
@Test(timeout = 30000)
public void testMultiNodeSingleDecisionPartialVote() throws Exception {
for (int c = 0; c < 1; c++) { // 随机 2-4 个节点,测试10次
int N = RandomUtils.randomNumber(2, 5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cn.edu.tsinghua.iginx.metadata.sync;
package cn.edu.tsinghua.iginx.integration.mds;

import cn.edu.tsinghua.iginx.metadata.sync.protocol.NetworkException;
import cn.edu.tsinghua.iginx.metadata.sync.protocol.SyncProtocol;
Expand Down

0 comments on commit 2753417

Please sign in to comment.