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

Issue 1488 #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches: [ "main", "branch-*" ]

concurrency:
group: ${{ github.worklfow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_requests' }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down
62 changes: 31 additions & 31 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,37 @@ allprojects {
}
}
}

apply(plugin = "jacoco")
tasks.configureEach<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
reports.html.outputLocation.set(file("${rootProject.projectDir}/build/test_reports/"))
val skipTests = project.hasProperty("skipTests")
if (!skipTests) {
if (project.name == "trino-connector") {
useTestNG()
maxHeapSize = "2G"
} else {
useJUnitPlatform()
}

jvmArgs(project.property("extraJvmArgs") as List<*>)
finalizedBy(tasks.getByName("jacocoTestReport"))
}
}

tasks.withType<JacocoReport> {
reports {
csv.required.set(true)
xml.required.set(true)
html.required.set(true)
}
}
}

nexusPublishing {
Expand Down Expand Up @@ -155,7 +186,6 @@ dependencies {
}

subprojects {
apply(plugin = "jacoco")
apply(plugin = "maven-publish")
apply(plugin = "java")

Expand Down Expand Up @@ -261,36 +291,6 @@ subprojects {
sign(publishing.publications)
}

tasks.configureEach<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
}
reports.html.outputLocation.set(file("${rootProject.projectDir}/build/reports/"))
val skipTests = project.hasProperty("skipTests")
if (!skipTests) {
if (project.name == "trino-connector") {
useTestNG()
maxHeapSize = "2G"
} else {
useJUnitPlatform()
}

jvmArgs(project.property("extraJvmArgs") as List<*>)
finalizedBy(tasks.getByName("jacocoTestReport"))
}
}

tasks.withType<JacocoReport> {
reports {
csv.required.set(true)
xml.required.set(true)
html.required.set(true)
}
}

tasks.register("allDeps", DependencyReportTask::class)

group = "com.datastrato.gravitino"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ private static KvBackend createKvEntityBackend(Config config) {
private StorageLayoutVersion initStorageVersionInfo() {
byte[] bytes;
try {

// For test
System.out.println("xxxxx");
bytes = backend.get(LAYOUT_VERSION_KEY);
if (bytes == null) {
// If the layout version is not set, we will set it to the default version.
Expand Down
Loading