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
26 changes: 9 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
// Copyright © 2024 MarkLogic Corporation. All Rights Reserved.

// We need the properties plugin to work on both marklogic-client-api and test-app. The 'plugins' Gradle syntax can't be
// used for that. So we have to add the properties plugin to the buildscript classpath and then apply the properties
// plugin via subprojects below.
buildscript {
repositories {
maven {
url = "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.saliman:gradle-properties-plugin:1.5.2"
}
}
/*
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/

subprojects {
apply plugin: "net.saliman.properties"
apply plugin: 'java'
apply plugin: 'java-library'

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
Expand Down Expand Up @@ -46,6 +33,11 @@ subprojects {
}

test {
useJUnitPlatform()
testLogging {
events = ['started', 'passed', 'skipped', 'failed']
exceptionFormat = 'full'
}
systemProperty "file.encoding", "UTF-8"
systemProperty "javax.xml.stream.XMLOutputFactory", "com.sun.xml.internal.stream.XMLOutputFactoryImpl"
}
Expand Down
8 changes: 3 additions & 5 deletions examples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright © 2025 MarkLogic Corporation. All Rights Reserved.

plugins {
id "java-library"
}
/*
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/

dependencies {
implementation project(':marklogic-client-api')
Expand Down

This file was deleted.

44 changes: 20 additions & 24 deletions marklogic-client-api-functionaltests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
*/

test {
useJUnitPlatform()
testLogging{
events 'started','passed', 'skipped'
}
// For use in testing TestDatabaseClientKerberosFromFile
systemProperty "keytabFile", System.getProperty("keytabFile")
systemProperty "principal", System.getProperty("principal")
// For use in testing TestDatabaseClientKerberosFromFile
systemProperty "keytabFile", System.getProperty("keytabFile")
systemProperty "principal", System.getProperty("principal")

systemProperty "TEST_USE_REVERSE_PROXY_SERVER", testUseReverseProxyServer
}
Expand Down Expand Up @@ -43,34 +39,34 @@ dependencies {

tasks.register("runFragileTests", Test) {
useJUnitPlatform()
description = "These are called 'fragile' because they'll pass when run by themselves, but when run as part of the " +
"full suite, there seem to be one or more other fast functional tests that run before them and cause some of " +
"their test methods to break. The Jenkinsfile thus calls these first before running the other functional " +
"tests."
include "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
include "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
include "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
description = "These are called 'fragile' because they'll pass when run by themselves, but when run as part of the " +
"full suite, there seem to be one or more other fast functional tests that run before them and cause some of " +
"their test methods to break. The Jenkinsfile thus calls these first before running the other functional " +
"tests."
include "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
include "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
include "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
}

tasks.register("runFastFunctionalTests", Test) {
useJUnitPlatform()
description = "Run all fast functional tests that don't setup/teardown custom app servers / databases"
include "com/marklogic/client/fastfunctest/**"
// Exclude the "fragile" ones
exclude "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
exclude "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
exclude "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
description = "Run all fast functional tests that don't setup/teardown custom app servers / databases"
include "com/marklogic/client/fastfunctest/**"
// Exclude the "fragile" ones
exclude "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
exclude "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
exclude "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
}

tasks.register("runSlowFunctionalTests", Test) {
useJUnitPlatform()
description = "Run slow functional tests; i.e. those that setup/teardown custom app servers / databases"
include "com/marklogic/client/datamovement/functionaltests/**"
include "com/marklogic/client/functionaltest/**"
description = "Run slow functional tests; i.e. those that setup/teardown custom app servers / databases"
include "com/marklogic/client/datamovement/functionaltests/**"
include "com/marklogic/client/functionaltest/**"
}

tasks.register("runFunctionalTests") {
dependsOn(runFragileTests, runFastFunctionalTests, runSlowFunctionalTests)
dependsOn(runFragileTests, runFastFunctionalTests, runSlowFunctionalTests)
}
runFastFunctionalTests.mustRunAfter runFragileTests
runSlowFunctionalTests.mustRunAfter runFastFunctionalTests
Loading