Skip to content

Commit 7baddea

Browse files
committed
MLE-24230 Using mlWaitTillReady
1 parent 5e8b43f commit 7baddea

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tmp
77
.settings
88
.vscode
99
.DS_Store
10+
.gradle
1011

1112
docker
1213
test-app/build

Jenkinsfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ def runTests() {
1010
npm --version
1111
npm ci
1212
13-
cd test-app
14-
./gradlew -i mlTestConnections
15-
./gradlew -i mlDeploy
13+
cd test-app
14+
./gradlew -i mlWaitTillReady
15+
./gradlew -i mlTestConnections
16+
./gradlew -i mlDeploy
1617
1718
cd ..
1819
rm -rf $WORKSPACE/*.xml || true
@@ -33,8 +34,6 @@ def runDockerCompose(String markLogicDockerImage) {
3334
cd node-client-api
3435
echo "Running docker compose with MarkLogic image: ''' + markLogicDockerImage + '''"
3536
MARKLOGIC_LOGS_VOLUME=/tmp MARKLOGIC_IMAGE=''' + markLogicDockerImage + ''' docker-compose up -d --build
36-
echo "Waiting 90s for MarkLogic to be ready to accept connections"
37-
sleep 90s;
3837
'''
3938
}
4039

test-app/build.gradle

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
// Only used for setting up the test AppServer in MarkLogic
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
// Needed for ml-gradle 6.2-SNAPSHOT
5+
maven {
6+
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
7+
}
8+
}
9+
dependencies {
10+
classpath "com.marklogic:ml-gradle:6.2-SNAPSHOT"
11+
}
12+
}
13+
214
plugins {
3-
id 'net.saliman.properties' version '1.5.2'
4-
// Sticking with 5.0.0 until a bug in 6.0.x is fixed where LSQT config isn't deployed correctly.
5-
id "com.marklogic.ml-gradle" version "5.0.0"
15+
id "net.saliman.properties" version "1.5.2"
16+
}
17+
18+
apply plugin: "com.marklogic.ml-gradle"
19+
20+
// Using longer values as MarkLogic seems to take much longer to initialize with the Jenkins nodeclientpool.
21+
mlWaitTillReady {
22+
waitInterval = 3000
23+
maxAttempts = 40
624
}
725

826
tasks.register("addMarkLogic12SchemasIfNecessary", com.marklogic.gradle.task.MarkLogicTask) {
@@ -22,9 +40,9 @@ mlLoadSchemas.dependsOn addMarkLogic12SchemasIfNecessary
2240
* that requires SSL.
2341
*/
2442
ext {
25-
def command = new com.marklogic.appdeployer.command.security.GenerateTemporaryCertificateCommand()
26-
command.setTemplateIdOrName("node-client-ssl-template")
27-
command.setCommonName("localhost")
28-
command.setValidFor(365)
29-
mlAppDeployer.commands.add(command)
43+
def command = new com.marklogic.appdeployer.command.security.GenerateTemporaryCertificateCommand()
44+
command.setTemplateIdOrName("node-client-ssl-template")
45+
command.setCommonName("localhost")
46+
command.setValidFor(365)
47+
mlAppDeployer.commands.add(command)
3048
}

0 commit comments

Comments
 (0)