SecurityContextHolder + @Async fixes and improvements (#930)
* @Async and Spring Security * @Async with SecurityContext propagated * Spring and @Async * Simulated Annealing algorithm * Simulated Annealing algorithm * Rebase * Rebase * SA further fixes * Slope One plus package refactoring * SlopeOne refactoring * Async improvements and fixes * Remove unnecessary bean * Final fixes to Spring Security @Async * Async Spring MVC
This commit is contained in:
@@ -12,7 +12,6 @@ import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockHttpSession;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
@@ -42,10 +41,8 @@ public class AsyncControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProcessUpload() throws Exception {
|
||||
MockMultipartFile jsonFile = new MockMultipartFile("json", "", "application/json",
|
||||
"{\"json\": \"someValue\"}".getBytes());
|
||||
mockMvc.perform(MockMvcRequestBuilders.fileUpload("/upload").file(jsonFile)).andExpect(status().isOk());
|
||||
public void testAsync() throws Exception {
|
||||
mockMvc.perform(MockMvcRequestBuilders.get("/async")).andExpect(status().is5xxServerError());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user