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
e8b7d0fc
Commit
e8b7d0fc
authored
Mar 29, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
70eee612
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
TomcatEmbeddedServletContainerFactoryTests.java
...ed/tomcat/TomcatEmbeddedServletContainerFactoryTests.java
+5
-5
No files found.
spring-boot/src/test/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactoryTests.java
View file @
e8b7d0fc
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -560,7 +560,7 @@ public class TomcatEmbeddedServletContainerFactoryTests
throws
IOException
,
URISyntaxException
{
TomcatEmbeddedServletContainerFactory
factory
=
new
TomcatEmbeddedServletContainerFactory
(
0
);
AtomicReference
<
ServletContext
>
servletContextReference
=
new
AtomicReference
<
>();
final
AtomicReference
<
ServletContext
>
servletContextReference
=
new
AtomicReference
<
ServletContext
>();
factory
.
addInitializers
(
new
ServletContextInitializer
()
{
@Override
...
...
@@ -588,11 +588,11 @@ public class TomcatEmbeddedServletContainerFactoryTests
FileSystemUtils
.
deleteRecursively
(
temp
);
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
body
=
new
LinkedMultiValueMap
<>();
MultiValueMap
<
String
,
Object
>
body
=
new
LinkedMultiValueMap
<
String
,
Object
>();
body
.
add
(
"file"
,
new
ByteArrayResource
(
new
byte
[
1024
*
1024
]));
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
requestEntity
=
new
HttpEntity
<
>(
body
,
headers
);
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
requestEntity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
body
,
headers
);
ResponseEntity
<
String
>
response
=
restTemplate
.
postForEntity
(
getLocalUrl
(
"/upload"
),
requestEntity
,
String
.
class
);
assertThat
(
response
.
getStatusCode
()).
isEqualTo
(
HttpStatus
.
OK
);
...
...
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