Skip to content

Commit

Permalink
Updated docker-compose version to support memory and cpu limit
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitkhandelwal1984 committed Jul 25, 2018
1 parent eb8542c commit 14fd096
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
version: '3'
version: '2.2'
services:
bankofspring:
build:
context: ./
dockerfile: Dockerfile
ports:
- '8080:8080'
image: bankofspring
image: bankofspring
mem_limit: "256m"
cpu_count: 1
cpu_percent: 50
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
/*@RunWith(Suite.class)
@Suite.SuiteClasses({
CustomerControllerTest.class,
AccountControllerTest.class
})
})*/
public class BankOfSpringApplicationTests {

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import org.junit.runners.Suite;


@RunWith(Suite.class)
/*@RunWith(Suite.class)
@Suite.SuiteClasses({
CustomerControllerMockMvcStandaloneTest.class
})
})*/
/**
* Created by Arpit Khandelwal.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void ut4_CreateAccount() throws Exception {
* @throws Exception
*/
@Test
public void ut4_CreateAccount_InvalidCustomer() throws Exception {
public void ut5_CreateAccount_InvalidCustomer() throws Exception {
mockMvc
.perform(MockMvcRequestBuilders.post("/v1/account/create")
.contentType(MediaType.APPLICATION_JSON)
Expand All @@ -173,7 +173,7 @@ public void ut4_CreateAccount_InvalidCustomer() throws Exception {
* @throws Exception
*/
@Test
public void ut5_DepositMoney() throws Exception {
public void ut6_DepositMoney() throws Exception {
mockMvc
.perform(MockMvcRequestBuilders.post("/v1/account/deposit")
.contentType(MediaType.APPLICATION_JSON)
Expand All @@ -193,7 +193,7 @@ public void ut5_DepositMoney() throws Exception {
* @throws Exception
*/
@Test
public void ut6_WithdrawMoney() throws Exception {
public void ut7_WithdrawMoney() throws Exception {
mockMvc
.perform(MockMvcRequestBuilders.post("/v1/account/withdraw")
.contentType(MediaType.APPLICATION_JSON)
Expand All @@ -213,7 +213,7 @@ public void ut6_WithdrawMoney() throws Exception {
* @throws Exception
*/
@Test
public void ut7_WithdrawMoney_InsufficientFunds() throws Exception {
public void ut8_WithdrawMoney_InsufficientFunds() throws Exception {
mockMvc
.perform(MockMvcRequestBuilders.post("/v1/account/withdraw")
.contentType(MediaType.APPLICATION_JSON)
Expand All @@ -234,7 +234,7 @@ public void ut7_WithdrawMoney_InsufficientFunds() throws Exception {
* @throws Exception
*/
@Test
public void ut8_TransferMoney() throws Exception {
public void ut9_TransferMoney() throws Exception {
mockMvc
.perform(MockMvcRequestBuilders.post("/v1/account/transfer")
.contentType(MediaType.APPLICATION_JSON)
Expand All @@ -257,7 +257,7 @@ public void ut8_TransferMoney() throws Exception {
* @throws Exception
*/
@Test
public void ut9_TransferMoney_InvalidRecipient() throws Exception {
public void ut10_TransferMoney_InvalidRecipient() throws Exception {
mockMvc
.perform(MockMvcRequestBuilders.post("/v1/account/transfer")
.contentType(MediaType.APPLICATION_JSON)
Expand Down

0 comments on commit 14fd096

Please sign in to comment.