Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(store): integrate rest of store-test submodule #2563

Merged
merged 12 commits into from
Jul 20, 2024
31 changes: 30 additions & 1 deletion .github/workflows/pd-store-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "hugegraph-pd-store-ci"
name: "pd-store-ci"

on:
push:
Expand Down Expand Up @@ -109,10 +109,39 @@ jobs:
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml

- name: Package
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp

- name: Prepare env and service
run: |
$TRAVIS_DIR/start-pd.sh
$TRAVIS_DIR/start-store.sh

- name: Run common test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test

- name: Run client test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test

- name: Run core test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test

- name: Run rocksdb test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test

- name: Run server test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test

- name: Run raft-core test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ public boolean merge(String table, HgOwnerKey key, byte[] value) {
private boolean prepareBatchEntry(OpType opType, String table
, HgOwnerKey startKey, HgOwnerKey endKey, byte[] value) {
this.batchEntryBuilder.clear().setOpType(opType);
this.batchEntryBuilder.setTable(tables.get(table));
Integer tableCode = tables.get(table);
if (tableCode != null) {
this.batchEntryBuilder.setTable(tableCode);
}
if (startKey != null) {
this.batchEntryBuilder.setStartKey(toKey(startKey));
}
Expand Down
147 changes: 73 additions & 74 deletions hugegraph-store/hg-store-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.hugegraph</groupId>-->
<!-- <artifactId>hg-store-core</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hg-store-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hg-pd-grpc</artifactId>
Expand Down Expand Up @@ -203,12 +203,12 @@
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.hugegraph</groupId>-->
<!-- <artifactId>hg-store-node</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hg-store-node</artifactId>
<version>${revision}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -217,31 +217,30 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<executions>
<!-- TODO:uncomment later-->
<!-- <execution>-->
<!-- <id>store-client-test</id>-->
<!-- <configuration>-->
<!-- <testSourceDirectory>${basedir}/src/main/java/-->
<!-- </testSourceDirectory>-->
<!-- <testClassesDirectory>${basedir}/target/classes/-->
<!-- </testClassesDirectory>-->
<!-- <includes>-->
<!-- <include>**/ClientSuiteTest.java</include>-->
<!-- </includes>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- <execution>-->
<!-- <id>store-core-test</id>-->
<!-- <configuration>-->
<!-- <testSourceDirectory>${basedir}/src/main/java/-->
<!-- </testSourceDirectory>-->
<!-- <testClassesDirectory>${basedir}/target/classes/-->
<!-- </testClassesDirectory>-->
<!-- <includes>-->
<!-- <include>**/CoreSuiteTest.java</include>-->
<!-- </includes>-->
<!-- </configuration>-->
<!-- </execution>-->
<execution>
<id>store-client-test</id>
<configuration>
<testSourceDirectory>${basedir}/src/main/java/
</testSourceDirectory>
<testClassesDirectory>${basedir}/target/classes/
</testClassesDirectory>
<includes>
<include>**/ClientSuiteTest.java</include>
</includes>
</configuration>
</execution>
<execution>
<id>store-core-test</id>
<configuration>
<testSourceDirectory>${basedir}/src/main/java/
</testSourceDirectory>
<testClassesDirectory>${basedir}/target/classes/
</testClassesDirectory>
<includes>
<include>**/CoreSuiteTest.java</include>
</includes>
</configuration>
</execution>
<execution>
<id>store-common-test</id>
<configuration>
Expand All @@ -254,45 +253,45 @@
</includes>
</configuration>
</execution>
<!-- <execution>-->
<!-- <id>store-rocksdb-test</id>-->
<!-- <configuration>-->
<!-- <testSourceDirectory>${basedir}/src/main/java/-->
<!-- </testSourceDirectory>-->
<!-- <testClassesDirectory>${basedir}/target/classes/-->
<!-- </testClassesDirectory>-->
<!-- <includes>-->
<!-- <include>**/RocksDbSuiteTest.java</include>-->
<!-- </includes>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- <execution>-->
<!-- <id>store-server-test</id>-->
<!-- <configuration>-->
<!-- <testSourceDirectory>${basedir}/src/main/java/-->
<!-- </testSourceDirectory>-->
<!-- <testClassesDirectory>${basedir}/target/classes/-->
<!-- </testClassesDirectory>-->
<!-- <includes>-->
<!-- <include>**/ServerSuiteTest.java</include>-->
<!-- </includes>-->
<!-- <excludes>-->
<!-- <exclude>**/node/**/*</exclude>-->
<!-- </excludes>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- <execution>-->
<!-- <id>store-raftcore-test</id>-->
<!-- <configuration>-->
<!-- <testSourceDirectory>${basedir}/src/main/java/-->
<!-- </testSourceDirectory>-->
<!-- <testClassesDirectory>${basedir}/target/classes/-->
<!-- </testClassesDirectory>-->
<!-- <includes>-->
<!-- <include>**/RaftSuiteTest.java</include>-->
<!-- </includes>-->
<!-- </configuration>-->
<!-- </execution>-->
<execution>
<id>store-rocksdb-test</id>
<configuration>
<testSourceDirectory>${basedir}/src/main/java/
</testSourceDirectory>
<testClassesDirectory>${basedir}/target/classes/
</testClassesDirectory>
<includes>
<include>**/RocksDbSuiteTest.java</include>
</includes>
</configuration>
</execution>
<execution>
<id>store-server-test</id>
<configuration>
<testSourceDirectory>${basedir}/src/main/java/
</testSourceDirectory>
<testClassesDirectory>${basedir}/target/classes/
</testClassesDirectory>
<includes>
<include>**/ServerSuiteTest.java</include>
</includes>
<excludes>
<exclude>**/node/**/*</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>store-raftcore-test</id>
<configuration>
<testSourceDirectory>${basedir}/src/main/java/
</testSourceDirectory>
<testClassesDirectory>${basedir}/target/classes/
</testClassesDirectory>
<includes>
<include>**/RaftSuiteTest.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
Loading
Loading