Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 51 additions & 2 deletions .github/workflows/mvn-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

- name: Run Unit Tests with Coverage
# verify because it runs the tests and generates the coverage report, ITs are skipped
run: ./mvnw verify -Pcoverage --batch-mode --errors --fail-never --show-version -pl !e2e,!e2e-perf
run: ./mvnw verify -Pcoverage --batch-mode --errors --fail-never --show-version -pl !e2e,!e2e-perf -DexcludedGroups=slow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -110,7 +110,50 @@
**/jacoco*.xml
retention-days: 1

slow-unit-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up JDK 21
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"

- name: Restore Maven artifacts
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}

- name: Run Slow Unit Tests with Coverage
run: ./mvnw verify -Pcoverage --batch-mode --errors --fail-never --show-version -pl engine -Dgroups=slow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Unit Tests Reporter
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1
if: success() || failure()
with:
name: Unit Tests Report
path: "**/surefire-reports/TEST*.xml"
list-suites: "failed"
list-tests: "failed"
reporter: java-junit

- name: Upload unit test coverage reports
if: success() || failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: slow-unit-coverage-reports
path: |
**/jacoco*.xml
retention-days: 1

integration-tests:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: ubuntu-latest
needs: build-and-package
steps:
Expand Down Expand Up @@ -369,7 +412,7 @@

coverage-report:
runs-on: ubuntu-latest
needs: [ unit-tests, integration-tests ]
needs: [ unit-tests, integration-tests, slow-unit-tests ]
if: success() || failure()
steps:
- name: Download unit test coverage reports
Expand All @@ -378,6 +421,12 @@
name: unit-coverage-reports
path: unit-coverage

- name: Download unit test coverage reports
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: slow-unit-coverage-reports
path: slow-unit-coverage

- name: Download integration test coverage reports
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
Expand Down
18 changes: 13 additions & 5 deletions engine/src/test/java/com/arcadedb/ACIDTransactionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@
import com.arcadedb.schema.Schema;
import com.arcadedb.schema.Type;
import com.arcadedb.schema.VertexType;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.io.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.logging.*;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
Expand Down Expand Up @@ -256,6 +262,7 @@ public Void call() throws IOException {
}

@Test
@Tag("slow")
public void testAsyncIOExceptionAfterWALIsWrittenManyRecords() {
final Database db = database;

Expand Down Expand Up @@ -397,6 +404,7 @@ public void multiThreadConcurrentTransactions() {
}

@Test
@Tag("slow")
public void testAsyncEdges() {
final Database db = database;

Expand Down
3 changes: 3 additions & 0 deletions engine/src/test/java/com/arcadedb/CRUDTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.arcadedb.schema.Schema;
import com.arcadedb.schema.Type;

import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.util.concurrent.atomic.*;
Expand Down Expand Up @@ -77,6 +78,7 @@ public void testUpdate() {
}

@Test
@Tag("slow")
public void testMultiUpdatesOverlap() {
final Database db = database;

Expand Down Expand Up @@ -177,6 +179,7 @@ public void testUpdateAndDelete() {
}

@Test
@Tag("slow")
public void testMultiUpdatesAndDeleteOverlap() {
final Database db = database;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.arcadedb.schema.Schema;
import com.arcadedb.schema.VertexType;
import com.arcadedb.utility.Pair;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.math.*;
Expand All @@ -58,6 +59,7 @@ public class RandomTestMultiThreadsTest extends TestHelper {
private final boolean debug = false;

@Test
@Tag("slow")
public void testRandom() {
GlobalConfiguration.COMMIT_LOCK_TIMEOUT.setValue(10_000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.arcadedb.database.Record;
import com.arcadedb.graph.MutableVertex;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.util.*;
Expand All @@ -34,6 +35,7 @@ public class RandomDeleteTest {
private static final int CYCLES = 3;

@Test
@Tag("slow")
public void testSmallRecords() {
try (DatabaseFactory databaseFactory = new DatabaseFactory("databases/randomDeleteTest")) {
if (databaseFactory.exists())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
import com.arcadedb.database.Database;
import com.arcadedb.database.DatabaseFactory;
import com.arcadedb.database.RID;
import com.arcadedb.graph.MutableEdge;
import com.arcadedb.graph.MutableVertex;
import com.arcadedb.graph.Vertex;
import com.arcadedb.query.select.SelectIterator;
import com.arcadedb.query.sql.executor.ResultSet;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.io.*;
import java.util.*;
import java.io.File;
import java.util.Collection;

import static com.arcadedb.schema.LocalSchema.STATISTICS_FILE_NAME;
import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -43,6 +43,7 @@ public class RecordRecyclingTest {
private final static int TOT_VERTICES = 1000;

@Test
@Tag("slow")
public void testCreateAndDeleteGraph() {
GlobalConfiguration.BUCKET_REUSE_SPACE_MODE.setValue("high");

Expand Down
2 changes: 2 additions & 0 deletions engine/src/test/java/com/arcadedb/index/LSMTreeIndexTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.arcadedb.schema.DocumentType;
import com.arcadedb.schema.Schema;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
Expand Down Expand Up @@ -1011,6 +1012,7 @@ public void testScanIndexRangeExclusive2Exclusive() {
}

@Test
@Tag("slow")
public void testUniqueConcurrentWithIndexesCompaction() throws InterruptedException {
database.begin();
final long startingWith = database.countType(TYPE_NAME, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.arcadedb.schema.Schema;
import com.arcadedb.schema.Type;
import com.arcadedb.schema.VertexType;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
Expand Down Expand Up @@ -560,6 +561,7 @@ public void testScanIndexRangeExclusive2ExclusiveInverse() {
}

@Test
@Tag("slow")
public void testUniqueConcurrentWithIndexesCompaction() {
GlobalConfiguration.INDEX_COMPACTION_MIN_PAGES_SCHEDULE.setValue(0);

Expand Down
Loading