fixed tests

This commit is contained in:
dartpopikyardo
2016-09-01 08:08:30 +03:00
parent a5d1e7312c
commit 2b0c405378
3 changed files with 2 additions and 23 deletions

View File

@@ -1,9 +1,8 @@
package net.chrisrichardson.eventstore.javaexamples.banking.web;
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.*;
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.CustomerInfo;
import net.chrisrichardson.eventstore.javaexamples.banking.common.customers.CustomerResponse;
import net.chrisrichardson.eventstorestore.javaexamples.testutil.CustomersTestUtils;
import org.apache.tomcat.jni.Thread;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -13,7 +12,6 @@ import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.client.RestTemplate;
import rx.Observable;
import javax.annotation.PostConstruct;
@@ -51,12 +49,6 @@ public class CustomersQuerySideServiceIntegrationTest {
final CustomerResponse customerResponse = restTemplate.postForEntity(baseUrl("/customers"), customerInfo, CustomerResponse.class).getBody();
final String customerId = customerResponse.getId();
try {
java.lang.Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
customersTestUtils.assertCustomerResponse(customerId, customerInfo);
}

View File

@@ -51,12 +51,6 @@ public abstract class AbstractRestAPITest {
Assert.assertNotNull(fromAccountId);
Assert.assertNotNull(toAccountId);
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
assertAccountBalance(fromAccountId, initialFromAccountBalance);
assertAccountBalance(toAccountId, initialToAccountBalance);
@@ -104,12 +98,6 @@ public abstract class AbstractRestAPITest {
Assert.assertNotNull(customerId);
assertEquals(customerInfo, customerResponse.getCustomerInfo());
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
getCustomersTestUtils().assertCustomerResponse(customerId, customerInfo);
final CreateAccountResponse account = getAuthenticatedRestTemplate().postForEntity(baseUrl("/accounts"),

View File

@@ -6,7 +6,6 @@ import org.springframework.web.client.RestTemplate;
import java.util.concurrent.CompletableFuture;
import static net.chrisrichardson.eventstorestore.javaexamples.testutil.TestUtil.awaitSuccessfulRequest;
import static net.chrisrichardson.eventstorestore.javaexamples.testutil.TestUtil.eventually;
/**