feat: add bounded cancellable payload work queue
This commit is contained in:
1 parent
2619f0936d
commit
691e949691
3 files changed
+192
-2
No files matched your search
+19
-2
@@ -81,6 +81,22 @@ if (providers.gradleProperty('interactionRegression').isPresent()) {
|
||||
sourceSets.main.java.srcDir('tests/integration')
|
||||
sourceSets.main.java.exclude('**/ChunkHandoffRegression.java')
|
||||
}
|
||||
if (providers.gradleProperty('ownershipRegression').isPresent()) {
|
||||
if (providers.gradleProperty('interactionRegression').isPresent()) {
|
||||
throw new GradleException('Run ownershipRegression and interactionRegression separately.')
|
||||
}
|
||||
sourceSets.main.java.srcDir('tests/ownership')
|
||||
dependencies { runtimeOnly files(providers.gradleProperty('ccTestJar').get()) }
|
||||
tasks.matching { it.name == 'runServer' }.configureEach {
|
||||
doLast {
|
||||
def output = file('runs/server/logs/latest.log').getText('UTF-8')
|
||||
['OWNERSHIP REGRESSION PASS', 'OWNERSHIP EDGE PASS', 'OWNERSHIP CALLBACK PASS', 'OWNERSHIP RESUME PASS'].each { marker ->
|
||||
if (!output.contains(marker)) throw new GradleException("Missing runtime test result: ${marker}")
|
||||
}
|
||||
if (output.contains('Encountered an unexpected exception')) throw new GradleException('Runtime regression server crashed.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(ProcessResources).configureEach {
|
||||
var replaceProperties = [
|
||||
@@ -121,11 +137,12 @@ tasks.register('compileConcurrencyRegression', JavaCompile) {
|
||||
'src/main/java/dev/modzuozhi/core/compat/TaskBarrier.java',
|
||||
'src/main/java/dev/modzuozhi/core/compat/ManagedFutureAwait.java',
|
||||
'src/main/java/dev/modzuozhi/core/compat/PauseOwnership.java', 'tests/PauseOwnershipRegression.java',
|
||||
'src/main/java/dev/modzuozhi/core/compat/TickProgress.java', 'tests/TickProgressRegression.java')
|
||||
'src/main/java/dev/modzuozhi/core/compat/TickProgress.java', 'tests/TickProgressRegression.java',
|
||||
'src/main/java/dev/modzuozhi/core/compat/PayloadWorkQueue.java', 'tests/PayloadWorkQueueRegression.java')
|
||||
classpath = files()
|
||||
destinationDirectory = regressionClasses
|
||||
}
|
||||
['TaskBarrierRegression', 'ManagedFutureAwaitRegression', 'PauseOwnershipRegression', 'TickProgressRegression'].each { regressionMain ->
|
||||
['TaskBarrierRegression', 'ManagedFutureAwaitRegression', 'PauseOwnershipRegression', 'TickProgressRegression', 'PayloadWorkQueueRegression'].each { regressionMain ->
|
||||
def regressionTask = tasks.register("run${regressionMain}", JavaExec) {
|
||||
dependsOn 'compileConcurrencyRegression'
|
||||
classpath = files(regressionClasses)
|
||||
|
||||
Reference in new issue
Block a user