Skip to content

Commit

Permalink
change base version to 2.5
Browse files Browse the repository at this point in the history
Signed-off-by: YANGDB <[email protected]>
  • Loading branch information
YANG-DB committed Jan 12, 2023
2 parents 973bf8f + c6a59f7 commit bb5b3e3
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/sql-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: SQL Java CI

on:
workflow_dispatch:
pull_request:
push:
branches-ignore:
Expand Down Expand Up @@ -45,6 +44,12 @@ jobs:
- name: Build with Gradle
run: ./gradlew --continue build ${{ matrix.entry.os_build_args }}

- name: PiTest with Gradle
run: |
./gradlew :core:pitest
./gradlew :opensearch:pitest

- name: Run backward compatibility tests
if: ${{ matrix.entry.os == 'ubuntu-latest' }}
run: ./scripts/bwctest.sh
Expand Down
4 changes: 4 additions & 0 deletions DEVELOPER_GUIDE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ Most of the time you just need to run ./gradlew build which will make sure you p
- Run all unit tests.
* - ./gradlew :integ-test:integTest
- Run all integration test (this takes time).
* - ./gradlew :doctest:doctest
- Run doctests
* - ./gradlew build
- Build plugin by run all tasks above (this takes time).
* - ./gradlew pitest
- Run PiTest mutation testing (see more info in `#1204 <https://github.com/opensearch-project/sql/pull/1204>`_)

For integration test, you can use ``-Dtests.class`` “UT full path” to run a task individually. For example ``./gradlew :integ-test:integTest -Dtests.class="*QueryIT"``.

Expand Down
10 changes: 10 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,23 @@ plugins {
id 'java-library'
id "io.freefair.lombok"
id 'jacoco'
id 'info.solidsoft.pitest' version '1.9.0'
id 'java-test-fixtures'
}

repositories {
mavenCentral()
}

pitest {
targetClasses = ['org.opensearch.sql.*']
pitestVersion = '1.9.0'
threads = 4
outputFormats = ['HTML', 'XML']
timestampedReports = false
junit5PluginVersion = '1.0.0'
}

dependencies {
api group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
Expand Down
21 changes: 10 additions & 11 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ dependencies {
testImplementation group: 'org.opensearch.client', name: 'opensearch-rest-client', version: "${opensearch_version}"
testImplementation group: 'org.opensearch.driver', name: 'opensearch-sql-jdbc', version: '1.2.0.0'
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.1'
testImplementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1'
testImplementation project(':opensearch-sql-plugin')
testImplementation project(':legacy')
Expand Down Expand Up @@ -229,7 +228,7 @@ task comparisonTest(type: RestIntegTestTask) {
systemProperty "queries", System.getProperty("queries")
}

String baseVersion = "2.4.0"
String baseVersion = "2.5.0"
String bwcVersion = baseVersion + ".0";
String baseName = "sqlBwcCluster"
String bwcFilePath = "src/test/resources/bwc/"
Expand Down Expand Up @@ -268,17 +267,17 @@ String bwcRemoteFile = "https://ci.opensearch.org/ci/dbc/distribution-build-open
}

List<Provider<RegularFile>> plugins = [
provider(new Callable<RegularFile>() {
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcFilePath + project.version).getSingleFile()
}
provider(new Callable<RegularFile>() {
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcFilePath + project.version).getSingleFile()
}
}
})
}
})
]

// Creates 2 test clusters with 3 nodes of the old version.
Expand Down
10 changes: 10 additions & 0 deletions opensearch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ plugins {
id 'java-library'
id "io.freefair.lombok"
id 'jacoco'
id 'info.solidsoft.pitest' version '1.9.0'
}

dependencies {
Expand All @@ -47,6 +48,15 @@ dependencies {
testImplementation group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}"
}

pitest {
targetClasses = ['org.opensearch.sql.*']
pitestVersion = '1.9.0'
threads = 4
outputFormats = ['HTML', 'XML']
timestampedReports = false
junit5PluginVersion = '1.0.0'
}

test {
useJUnitPlatform()
testLogging {
Expand Down
2 changes: 0 additions & 2 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ configurations.all {
// enforce 2.12.6, https://github.com/opensearch-project/sql/issues/424
resolutionStrategy.force "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
// enforce 1.1.3, https://www.whitesourcesoftware.com/vulnerability-database/WS-2019-0379
resolutionStrategy.force "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.14.0"
resolutionStrategy.force "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.0"
resolutionStrategy.force 'commons-codec:commons-codec:1.13'
resolutionStrategy.force 'com.google.guava:guava:31.0.1-jre'
resolutionStrategy.force "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}"
Expand Down

0 comments on commit bb5b3e3

Please sign in to comment.