diff --git a/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriter.java b/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriter.java index e209dfb0d..9ba3d5e7b 100644 --- a/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriter.java +++ b/eva-accession-pipeline/src/main/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriter.java @@ -146,7 +146,6 @@ public void open(ExecutionContext executionContext) throws ItemStreamException { boolean append = false; this.contigsWriter = new BufferedWriter(new FileWriter(this.contigsOutput, append)); this.variantsWriter = new BufferedWriter(new FileWriter(this.variantsOutput, append)); - executionContext.put(IS_HEADER_WRITTEN_KEY, IS_HEADER_WRITTEN_VALUE); } } } catch (IOException e) { @@ -176,7 +175,7 @@ private void loadContigMappingFromTemporaryFile(File contigMappingFile) throws I } public void update(ExecutionContext executionContext) throws ItemStreamException { - + executionContext.put(IS_HEADER_WRITTEN_KEY, IS_HEADER_WRITTEN_VALUE); } public void close() throws ItemStreamException { diff --git a/eva-accession-pipeline/src/test/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriterTest.java b/eva-accession-pipeline/src/test/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriterTest.java index 3aee49e5f..493bfd446 100644 --- a/eva-accession-pipeline/src/test/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriterTest.java +++ b/eva-accession-pipeline/src/test/java/uk/ac/ebi/eva/accession/pipeline/batch/io/AccessionReportWriterTest.java @@ -226,6 +226,7 @@ private void writeAndResumeAndWrite(String originalChromosome1, String contig1, accessionReportWriter.write(Collections.singletonList(variant), GetOrCreateAccessionWrapperCreator.convertToGetOrCreateAccessionWrapper( Collections.singletonList(accessionWrapper))); + accessionReportWriter.update(executionContext); accessionReportWriter.close(); // second writer