Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Commit

Permalink
JAV-252&305 Resolve conflicts for merge "event-improvement"
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengyangyong committed Aug 18, 2017
1 parent 1228052 commit dd2f184
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.web.WebAppConfiguration;
Expand All @@ -41,13 +42,13 @@
@RunWith(SpringRunner.class)
@SpringBootTest(classes = IntegrationTestApplication.class)
@WebAppConfiguration
@AutoConfigureMockMvc
public class SecKillIntegrationTestApplicationTest {

private final ObjectMapper objectMapper = new ObjectMapper();
private MockMvc mockMvc;

@Autowired
private WebApplicationContext webApplicationContext;
private MockMvc mockMvc;

@Autowired
private PromotionRepository promotionRepository;
Expand All @@ -58,7 +59,6 @@ public class SecKillIntegrationTestApplicationTest {

@Before
public void setup() throws Exception {
this.mockMvc = webAppContextSetup(webApplicationContext).build();
this.promotionRepository.deleteAll();
this.secKillRunner.run();
}
Expand All @@ -81,8 +81,4 @@ public void createPromotionAndGrabSuccessfully() throws Exception {
private String toJson(Object value) throws JsonProcessingException {
return objectMapper.writeValueAsString(value);
}

private Date timeFromNow(int offset) {
return new Date(System.currentTimeMillis() + offset);
}
}

0 comments on commit dd2f184

Please sign in to comment.