Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
c4b84ae9
Commit
c4b84ae9
authored
Mar 27, 2021
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25810 from dreis2211
* pr/25810: Fix flaky QuartzAutoConfigurationTests Closes gh-25810
parents
3ad5f101
be449195
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
QuartzAutoConfigurationTests.java
...ot/autoconfigure/quartz/QuartzAutoConfigurationTests.java
+5
-3
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java
View file @
c4b84ae9
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
21
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -19,10 +19,12 @@ package org.springframework.boot.autoconfigure.quartz;
...
@@ -19,10 +19,12 @@ package org.springframework.boot.autoconfigure.quartz;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Path
;
import
java.time.Duration
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.Executor
;
import
javax.sql.DataSource
;
import
javax.sql.DataSource
;
import
org.awaitility.Awaitility
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.extension.ExtendWith
;
import
org.junit.jupiter.api.extension.ExtendWith
;
import
org.junit.jupiter.api.io.TempDir
;
import
org.junit.jupiter.api.io.TempDir
;
...
@@ -194,8 +196,8 @@ class QuartzAutoConfigurationTests {
...
@@ -194,8 +196,8 @@ class QuartzAutoConfigurationTests {
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
assertThat
(
scheduler
.
getJobDetail
(
JobKey
.
jobKey
(
"fooJob"
))).
isNotNull
();
assertThat
(
scheduler
.
getJobDetail
(
JobKey
.
jobKey
(
"fooJob"
))).
isNotNull
();
assertThat
(
scheduler
.
getTrigger
(
TriggerKey
.
triggerKey
(
"fooTrigger"
))).
isNotNull
();
assertThat
(
scheduler
.
getTrigger
(
TriggerKey
.
triggerKey
(
"fooTrigger"
))).
isNotNull
();
Thread
.
sleep
(
1000L
);
Awaitility
.
waitAtMost
(
Duration
.
ofSeconds
(
5
)).
untilAsserted
(
assertThat
(
output
).
contains
(
"withConfiguredJobAndTrigger"
).
contains
(
"jobDataValue"
);
()
->
assertThat
(
output
).
contains
(
"withConfiguredJobAndTrigger"
).
contains
(
"jobDataValue"
)
);
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment