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
970f9338
Commit
970f9338
authored
May 13, 2021
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x' into 2.4.x
Closes gh-26450
parents
8ac297d6
64aac012
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
24 deletions
+8
-24
HandlerTests.java
...ava/org/springframework/boot/loader/jar/HandlerTests.java
+3
-11
SampleIntegrationParentApplicationTests.java
...ent/consumer/SampleIntegrationParentApplicationTests.java
+5
-13
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/HandlerTests.java
View file @
970f9338
/*
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
@@ -172,13 +172,9 @@ class HandlerTests {
...
@@ -172,13 +172,9 @@ class HandlerTests {
TestJarCreator
.
createTestJar
(
testJar
);
TestJarCreator
.
createTestJar
(
testJar
);
URL
url
=
new
URL
(
null
,
"jar:"
+
testJar
.
toURI
().
toURL
()
+
"!/nested.jar!/3.dat"
,
this
.
handler
);
URL
url
=
new
URL
(
null
,
"jar:"
+
testJar
.
toURI
().
toURL
()
+
"!/nested.jar!/3.dat"
,
this
.
handler
);
JarURLConnection
connection
=
(
JarURLConnection
)
url
.
openConnection
();
JarURLConnection
connection
=
(
JarURLConnection
)
url
.
openConnection
();
JarFile
jarFile
=
JarFileWrapper
.
unwrap
(
connection
.
getJarFile
());
try
(
JarFile
jarFile
=
JarFileWrapper
.
unwrap
(
connection
.
getJarFile
()))
{
try
{
assertThat
(
jarFile
.
getRootJarFile
().
getFile
()).
isEqualTo
(
testJar
);
assertThat
(
jarFile
.
getRootJarFile
().
getFile
()).
isEqualTo
(
testJar
);
}
}
finally
{
jarFile
.
close
();
}
}
}
@Test
@Test
...
@@ -187,13 +183,9 @@ class HandlerTests {
...
@@ -187,13 +183,9 @@ class HandlerTests {
TestJarCreator
.
createTestJar
(
testJar
);
TestJarCreator
.
createTestJar
(
testJar
);
URL
url
=
new
URL
(
null
,
"jar:"
+
testJar
.
toURI
().
toURL
()
+
"!/nested.jar!/3.dat"
,
this
.
handler
);
URL
url
=
new
URL
(
null
,
"jar:"
+
testJar
.
toURI
().
toURL
()
+
"!/nested.jar!/3.dat"
,
this
.
handler
);
JarURLConnection
connection
=
(
JarURLConnection
)
url
.
openConnection
();
JarURLConnection
connection
=
(
JarURLConnection
)
url
.
openConnection
();
JarFile
jarFile
=
JarFileWrapper
.
unwrap
(
connection
.
getJarFile
());
try
(
JarFile
jarFile
=
JarFileWrapper
.
unwrap
(
connection
.
getJarFile
()))
{
try
{
assertThat
(
jarFile
.
getRootJarFile
().
getFile
()).
isEqualTo
(
testJar
);
assertThat
(
jarFile
.
getRootJarFile
().
getFile
()).
isEqualTo
(
testJar
);
}
}
finally
{
jarFile
.
close
();
}
}
}
private
void
assertStandardAndCustomHandlerUrlsAreEqual
(
String
context
,
String
spec
)
throws
MalformedURLException
{
private
void
assertStandardAndCustomHandlerUrlsAreEqual
(
String
context
,
String
spec
)
throws
MalformedURLException
{
...
...
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-parent-context/src/test/java/smoketest/parent/consumer/SampleIntegrationParentApplicationTests.java
View file @
970f9338
/*
/*
* 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.
...
@@ -49,20 +49,12 @@ class SampleIntegrationParentApplicationTests {
...
@@ -49,20 +49,12 @@ class SampleIntegrationParentApplicationTests {
void
testVanillaExchange
(
@TempDir
Path
temp
)
throws
Exception
{
void
testVanillaExchange
(
@TempDir
Path
temp
)
throws
Exception
{
File
inputDir
=
new
File
(
temp
.
toFile
(),
"input"
);
File
inputDir
=
new
File
(
temp
.
toFile
(),
"input"
);
File
outputDir
=
new
File
(
temp
.
toFile
(),
"output"
);
File
outputDir
=
new
File
(
temp
.
toFile
(),
"output"
);
ConfigurableApplicationContext
app
=
SpringApplication
.
run
(
SampleParentContextApplication
.
class
,
try
(
ConfigurableApplicationContext
app
=
SpringApplication
.
run
(
SampleParentContextApplication
.
class
,
"--service.input-dir="
+
inputDir
,
"--service.output-dir="
+
outputDir
);
"--service.input-dir="
+
inputDir
,
"--service.output-dir="
+
outputDir
))
{
try
{
try
(
ConfigurableApplicationContext
producer
=
SpringApplication
.
run
(
ProducerApplication
.
class
,
ConfigurableApplicationContext
producer
=
SpringApplication
.
run
(
ProducerApplication
.
class
,
"--service.input-dir="
+
inputDir
,
"--service.output-dir="
+
outputDir
,
"World"
))
{
"--service.input-dir="
+
inputDir
,
"--service.output-dir="
+
outputDir
,
"World"
);
try
{
awaitOutputContaining
(
outputDir
,
"Hello World"
);
awaitOutputContaining
(
outputDir
,
"Hello World"
);
}
}
finally
{
producer
.
close
();
}
}
finally
{
app
.
close
();
}
}
}
}
...
...
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