Fix tests
This commit is contained in:
parent
0e7405cef2
commit
1eb4dd06be
|
@ -350,7 +350,7 @@
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<runOrder>alphabetical</runOrder>
|
<runOrder>alphabetical</runOrder>
|
||||||
<argLine>${argLine} -Dfile.encoding=UTF-8 -Xmx712m</argLine>
|
<argLine>${argLine} -Dfile.encoding=UTF-8 -Xmx1024m</argLine>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class AuthorizationInterceptorResourceProviderDstu3Test extends BaseResou
|
||||||
final IdType id;
|
final IdType id;
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -593,7 +593,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
IdType id;
|
IdType id;
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -606,7 +606,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
response = ourHttpClient.execute(post);
|
response = ourHttpClient.execute(post);
|
||||||
try {
|
try {
|
||||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertEquals(id.getValue(), newIdString); // version should match for conditional create
|
assertEquals(id.getValue(), newIdString); // version should match for conditional create
|
||||||
} finally {
|
} finally {
|
||||||
response.close();
|
response.close();
|
||||||
|
@ -633,7 +633,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
|
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
|
||||||
ourLog.info("Response: {}", respString);
|
ourLog.info("Response: {}", respString);
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -675,7 +675,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
|
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
|
||||||
ourLog.info("Response: {}", respString);
|
ourLog.info("Response: {}", respString);
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -692,7 +692,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
|
String respString = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
|
||||||
ourLog.info("Response: {}", respString);
|
ourLog.info("Response: {}", respString);
|
||||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -729,7 +729,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
CloseableHttpResponse response = ourHttpClient.execute(post);
|
CloseableHttpResponse response = ourHttpClient.execute(post);
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -740,7 +740,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
response = ourHttpClient.execute(post);
|
response = ourHttpClient.execute(post);
|
||||||
try {
|
try {
|
||||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id2 = new IdType(newIdString);
|
id2 = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -976,7 +976,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
IdType id;
|
IdType id;
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1020,7 +1020,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
IdType id;
|
IdType id;
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -2716,7 +2716,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
IdType id;
|
IdType id;
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -2728,7 +2728,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
response = ourHttpClient.execute(put);
|
response = ourHttpClient.execute(put);
|
||||||
try {
|
try {
|
||||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||||
IdType newId = new IdType(response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue());
|
IdType newId = new IdType(response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue());
|
||||||
assertEquals(id.toVersionless(), newId.toVersionless()); // version shouldn't match for conditional update
|
assertEquals(id.toVersionless(), newId.toVersionless()); // version shouldn't match for conditional update
|
||||||
assertNotEquals(id, newId);
|
assertNotEquals(id, newId);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -2751,7 +2751,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
CloseableHttpResponse response = ourHttpClient.execute(post);
|
CloseableHttpResponse response = ourHttpClient.execute(post);
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -2767,7 +2767,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
response = ourHttpClient.execute(put);
|
response = ourHttpClient.execute(put);
|
||||||
try {
|
try {
|
||||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id2 = new IdType(newIdString);
|
id2 = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -2794,7 +2794,7 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
|
||||||
IdType id;
|
IdType id;
|
||||||
try {
|
try {
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/Patient/"));
|
||||||
id = new IdType(newIdString);
|
id = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class ResourceProviderQuestionnaireResponseDstu3Test extends BaseResource
|
||||||
String responseString = IOUtils.toString(response.getEntity().getContent());
|
String responseString = IOUtils.toString(response.getEntity().getContent());
|
||||||
ourLog.info("Response: {}", responseString);
|
ourLog.info("Response: {}", responseString);
|
||||||
assertEquals(201, response.getStatusLine().getStatusCode());
|
assertEquals(201, response.getStatusLine().getStatusCode());
|
||||||
String newIdString = response.getFirstHeader(Constants.HEADER_LOCATION_LC).getValue();
|
String newIdString = response.getFirstHeader(Constants.HEADER_CONTENT_LOCATION_LC).getValue();
|
||||||
assertThat(newIdString, startsWith(ourServerBase + "/QuestionnaireResponse/"));
|
assertThat(newIdString, startsWith(ourServerBase + "/QuestionnaireResponse/"));
|
||||||
id2 = new IdType(newIdString);
|
id2 = new IdType(newIdString);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -814,7 +814,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||||
<runOrder>random</runOrder>
|
<runOrder>random</runOrder>
|
||||||
<argLine>-Dfile.encoding=UTF-8 -Xmx712m</argLine>
|
<argLine>-Dfile.encoding=UTF-8 -Xmx1024m</argLine>
|
||||||
<forkCount>1.0C</forkCount>
|
<forkCount>1.0C</forkCount>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
Loading…
Reference in New Issue