Skip to content
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
8 changes: 8 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.codecov.com/docs/pull-request-comments
comment:
layout: "diff, flags, files"
behavior: default
require_changes: false
require_base: false
require_head: true
hide_project_coverage: false
6 changes: 5 additions & 1 deletion .github/workflows/pull_request_event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Test
run: ./gradlew clean test --info
run: ./gradlew clean test jacocoAggregateReport --info
- name: Upload the coverage report to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
43 changes: 42 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ allprojects {
finalizedBy(tasks.jacocoTestReport)
}

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

Expand Down Expand Up @@ -152,3 +153,43 @@ subprojects {
}
}
}

tasks.register<JacocoReport>("jacocoAggregateReport") {
dependsOn(subprojects.map { it.tasks.named("test") })

additionalSourceDirs.setFrom(
files(
subprojects.map {
it.sourceSets.main.get().allSource.srcDirs
},
),
)
sourceDirectories.setFrom(
files(
subprojects.map {
it.sourceSets.main.get().allSource.srcDirs
},
),
)
classDirectories.setFrom(
files(
subprojects.map {
it.sourceSets.main.get().output
},
),
)
executionData.setFrom(
files(
subprojects.map {
it.buildDir.resolve("jacoco/test.exec")
},
),
)

reports {
xml.required.set(true)
xml.outputLocation.set(file("$buildDir/reports/jacoco/test/jacocoTestReport.xml"))
html.required.set(true)
html.outputLocation.set(file("$buildDir/reports/jacoco/test/html"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class KeyLocalLock(private val lockTimeoutMillis: Long) : KeyLock, CoroutineScop
while (isActive) {
runCatching {
val now = System.currentTimeMillis()
lockMap.entries.removeIf { now - it.value.createdAt > lockTimeoutMillis } // 특정 시간이 지나면 lock 여부와 상관없이 map에서 삭제한다.
lockMap.entries.removeIf { now - it.value.createdAt > lockTimeoutMillis }
delay(LOCK_MONITOR_INTERVAL_MILLIS)
}.onFailure { e ->
log.error("Error in lock lifecycle monitoring : {}", e.message)
Expand Down
Loading