Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Set directory service in constructor to reduce duplication
Browse files Browse the repository at this point in the history
Signed-off-by: Eamonn Mansour <[email protected]>
  • Loading branch information
eamansour committed Sep 12, 2024
1 parent cdbb1db commit 95d99fa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ public class CouchdbRunResult implements IRunResult {

private final TestStructureCouchdb testStructure;
private final CouchdbRasStore store;
private final CouchdbDirectoryService storeService;
private Path path;

public CouchdbRunResult(CouchdbRasStore store, TestStructureCouchdb testStructure, LogFactory logFactory) {
this.store = store;
this.storeService = (CouchdbDirectoryService) store.getDirectoryServices().get(0);
if (testStructure == null) {
this.testStructure = new TestStructureCouchdb();
} else {
Expand Down Expand Up @@ -50,7 +52,6 @@ public String getLog() throws ResultArchiveStoreException {

@Override
public void discard() throws ResultArchiveStoreException {
CouchdbDirectoryService storeService = (CouchdbDirectoryService) store.getDirectoryServices().get(0);
storeService.discardRun(this.testStructure);
}

Expand All @@ -61,7 +62,6 @@ public String getRunId() {

@Override
public void loadArtifacts() throws ResultArchiveStoreException {
CouchdbDirectoryService storeService = (CouchdbDirectoryService) store.getDirectoryServices().get(0);
this.path = storeService.getRunArtifactPath(this.testStructure);
}

Expand Down

0 comments on commit 95d99fa

Please sign in to comment.