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
5036fc50
Commit
5036fc50
authored
Jan 17, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x'
parents
357b9d66
29adf2d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
SampleIntegrationApplicationTests.java
...tegration/consumer/SampleIntegrationApplicationTests.java
+10
-9
No files found.
spring-boot-samples/spring-boot-sample-integration/src/test/java/sample/integration/consumer/SampleIntegrationApplicationTests.java
View file @
5036fc50
...
@@ -18,6 +18,7 @@ package sample.integration.consumer;
...
@@ -18,6 +18,7 @@ package sample.integration.consumer;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Future
;
import
java.util.concurrent.Future
;
...
@@ -57,13 +58,7 @@ public class SampleIntegrationApplicationTests {
...
@@ -57,13 +58,7 @@ public class SampleIntegrationApplicationTests {
private
void
deleteIfExists
(
File
directory
)
throws
InterruptedException
{
private
void
deleteIfExists
(
File
directory
)
throws
InterruptedException
{
if
(
directory
.
exists
())
{
if
(
directory
.
exists
())
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
assertThat
(
FileSystemUtils
.
deleteRecursively
(
directory
)).
isTrue
();
if
(
FileSystemUtils
.
deleteRecursively
(
directory
))
{
return
;
}
Thread
.
sleep
(
500
);
}
throw
new
IllegalStateException
(
"Failed to delete '"
+
directory
+
"'"
);
}
}
}
}
...
@@ -102,8 +97,14 @@ public class SampleIntegrationApplicationTests {
...
@@ -102,8 +97,14 @@ public class SampleIntegrationApplicationTests {
}
}
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
for
(
Resource
resource
:
resources
)
{
for
(
Resource
resource
:
resources
)
{
builder
.
append
(
new
String
(
StreamUtils
InputStream
inputStream
=
resource
.
getInputStream
();
.
copyToByteArray
(
resource
.
getInputStream
())));
try
{
builder
.
append
(
new
String
(
StreamUtils
.
copyToByteArray
(
inputStream
)));
}
finally
{
inputStream
.
close
();
}
}
}
return
builder
.
toString
();
return
builder
.
toString
();
}
}
...
...
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