Skip to content

Commit

Permalink
REVERT BEFORE MERGE!! - Testing with failure injection
Browse files Browse the repository at this point in the history
  • Loading branch information
mcovarr committed May 12, 2022
1 parent 7e3b8a0 commit 0096b7c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Random;

/**
* Ingest variant walker
Expand Down Expand Up @@ -296,8 +297,13 @@ public void apply(final VariantContext variant, final ReadsContext readsContext,

@Override
public Object onTraversalSuccess() {
int mod = new Random().nextInt(10);

if (outputType == CommonCode.OutputType.BQ && shouldWriteLoadStatusStarted) {
loadStatus.writeLoadStatusStarted(Long.parseLong(sampleId));
if (mod == 0) {
throw new GATKException("VS-262 Robustitude exception for sample id " + sampleId + " after sample load status started");
}
}

if (refCreator != null) {
Expand All @@ -308,10 +314,16 @@ public Object onTraversalSuccess() {
}
// Wait until all data has been submitted and in pending state to commit
refCreator.commitData();
if (mod == 1) {
throw new GATKException("VS-262 Robustitude exception for sample id " + sampleId + " after ref range write");
}
}

if (vetCreator != null) {
vetCreator.commitData();
if (mod == 2) {
throw new GATKException("VS-262 Robustitude exception for sample id " + sampleId + " after vet write");
}
}

// upload the load status table
Expand Down

0 comments on commit 0096b7c

Please sign in to comment.