Skip to content
Snippets Groups Projects
Commit 731bc2a7 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Minor changes

parent bb87abe9
No related branches found
No related tags found
No related merge requests found
Pipeline #955 passed
......@@ -42,10 +42,8 @@ test:
- docker
image: "${CI_REGISTRY_IMAGE}/vospace-test-env"
variables:
FILE_CATALOG_REPO_URL: "https://gitlab-ci-token:${CI_JOB_TOKEN}@www.ict.inaf.it/gitlab/ia2/vospace-file-catalog.git"
FILE_CATALOG_REPO_URL: "https://gitlab-ci-token:${CI_JOB_TOKEN}@www.ict.inaf.it/gitlab/vospace/vospace-file-catalog.git"
script:
- pwd
- ls
- git clone ${FILE_CATALOG_REPO_URL}
- mvn clean test -Dinit_database_scripts_path=../../vospace-file-catalog
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print "coverage=" 100*covered/instructions }' target/site/jacoco/jacoco.csv
......
......@@ -11,9 +11,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class TapeService {
public class AsyncTransferService {
private static final Logger LOG = LoggerFactory.getLogger(TapeService.class);
private static final Logger LOG = LoggerFactory.getLogger(AsyncTransferService.class);
@Autowired
private RabbitTemplate template;
......@@ -25,6 +25,10 @@ public class TapeService {
byte[] message = MAPPER.writeValueAsBytes(job);
byte[] result = (byte[]) template.convertSendAndReceive("start_job_queue", message);
if (result == null) {
throw new IllegalStateException("Transfer service returned an empty response");
}
LOG.trace("Tape transfer service answered:\n{}", new String(result));
return MAPPER.readValue(result, JobSummary.class);
......
......@@ -17,7 +17,7 @@ public class JobService {
private UriService uriService;
@Autowired
private TapeService tapeService;
private AsyncTransferService asyncTransfService;
public enum JobType {
pullToVoSpace,
......@@ -58,7 +58,7 @@ public class JobService {
private void handlePullToVoSpace(JobSummary job) {
// TODO: check protocol
tapeService.startJob(job);
asyncTransfService.startJob(job);
}
private void handleVoSpaceUrlsListResult(JobSummary job) {
......
......@@ -55,7 +55,7 @@ public class TransferControllerTest {
private NodeDAO nodeDao;
@MockBean
private TapeService tapeService;
private AsyncTransferService tapeService;
@Autowired
private MockMvc mockMvc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment