Try to fix permissions issues in travis

This commit is contained in:
James Agnew 2018-07-27 08:39:22 +07:00
parent 75a68a0332
commit d04db790a3
3 changed files with 35 additions and 22 deletions

View File

@ -26,4 +26,6 @@ before_script:
script:
# - mvn -e -B clean install && cd hapi-fhir-ra && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID clean test jacoco:report coveralls:report
# - mvn -Dci=true -e -B -P ALLMODULES,NOPARALLEL,ERRORPRONE clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report
- mvn -Dci=true -e -B -P ALLMODULES,REDUCED_JPA_TESTS,ERRORPRONE,JACOCO clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report
- sudo chmod -R 777 "$HOME/.m2/repository";
- sudo chown -R travis:travis "$HOME/.m2/repository";
- mvn -Dci=true -e -B -P ALLMODULES,REDUCED_JPA_TESTS,ERRORPRONE,JACOCO clean install && cd hapi-fhir-jacoco && mvn -e -B -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID jacoco:report coveralls:report;

View File

@ -9,9 +9,9 @@ package ca.uhn.fhir.rest.server;
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,24 +20,25 @@ package ca.uhn.fhir.rest.server;
* #L%
*/
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import org.hl7.fhir.instance.model.api.IBaseResource;
import java.util.Collections;
import java.util.List;
import org.hl7.fhir.instance.model.api.IBaseResource;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
public class SimpleBundleProvider implements IBundleProvider {
private List<IBaseResource> myList;
private final List<IBaseResource> myList;
private final String myUuid;
public SimpleBundleProvider(List<IBaseResource> theList) {
myList = theList;
this(theList, null);
}
public SimpleBundleProvider(IBaseResource theResource) {
myList = Collections.singletonList(theResource);
myUuid = null;
}
/**
@ -45,16 +46,12 @@ public class SimpleBundleProvider implements IBundleProvider {
*/
public SimpleBundleProvider() {
myList = Collections.emptyList();
myUuid = null;
}
@Override
public List<IBaseResource> getResources(int theFromIndex, int theToIndex) {
return myList.subList(theFromIndex, Math.min(theToIndex, myList.size()));
}
@Override
public Integer size() {
return myList.size();
public SimpleBundleProvider(List<IBaseResource> theList, String theUuid) {
myList = theList;
myUuid = theUuid;
}
@Override
@ -62,14 +59,24 @@ public class SimpleBundleProvider implements IBundleProvider {
return InstantDt.withCurrentTime();
}
@Override
public List<IBaseResource> getResources(int theFromIndex, int theToIndex) {
return myList.subList(theFromIndex, Math.min(theToIndex, myList.size()));
}
@Override
public String getUuid() {
return myUuid;
}
@Override
public Integer preferredPageSize() {
return null;
}
@Override
public String getUuid() {
return null;
public Integer size() {
return myList.size();
}
}

View File

@ -207,6 +207,10 @@
"username:password" as an alternate to specifying them as two
discrete strings.
</action>
<action type="add">
SimpleBundleProvider has been modified to optionally allow calling
code to specify a search UUID
</action>
</release>
<release version="3.4.0" date="2018-05-28">
<action type="add">