Skip to content

Commit

Permalink
Fix N5 Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AvocadoMoon committed Oct 2, 2024
1 parent 8f9e212 commit cdf1df1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public class N5Exporter implements ExportConstants {

public N5Exporter(ExportServiceImpl exportServiceImpl, User user, DataServerImpl dataServer, VCSimulationDataIdentifier vcSimulationDataIdentifier) {
this.exportServiceImpl = exportServiceImpl;
this.user = user;
this.dataServer = dataServer;
this.vcDataID = vcSimulationDataIdentifier;
}

private ExportOutput exportToN5(OutputContext outputContext, long jobID, N5Specs n5Specs, ExportSpecs exportSpecs, FileDataContainerManager fileDataContainerManager) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ enum TestModels{
private User testUser;
private CartesianMesh modelMesh;
private double[] times;
private ExportServiceImpl exportService = new ExportServiceImpl();


private ArrayList<DataIdentifier> dataIdentifiers;
Expand Down Expand Up @@ -129,16 +130,13 @@ public void setUp() throws IOException {
previousSimCacheSize = PropertyLoader.getProperty(PropertyLoader.simdataCacheSizeProperty, null);
PropertyLoader.setProperty(PropertyLoader.simdataCacheSizeProperty, "100000");

ExportServiceImpl exportService = new ExportServiceImpl();

Cachetable cachetable = new Cachetable(10 * Cachetable.minute, Long.parseLong(PropertyLoader.getRequiredProperty(PropertyLoader.simdataCacheSizeProperty)));
File primaryDir = new File(PropertyLoader.getRequiredProperty(PropertyLoader.primarySimDataDirInternalProperty));
File secodaryDir = new File(PropertyLoader.getRequiredProperty(PropertyLoader.secondarySimDataDirInternalProperty));
DataSetControllerImpl dataSetController = new DataSetControllerImpl(cachetable, primaryDir, secodaryDir);
DataServerImpl dataServer = new DataServerImpl(dataSetController, exportService);

testUser = new User("ezequiel23", new KeyValue("258925427"));
n5Exporter = new N5Exporter(exportService);
this.dataServer = dataServer;
}

Expand Down Expand Up @@ -202,7 +200,7 @@ private void setExportTestState(TestModels simModel) throws IOException, DataAcc
VCSimulationIdentifier vcSimulationIdentifier = new VCSimulationIdentifier(new KeyValue(simModel.simID), testUser);

vcDataID = new VCSimulationDataIdentifier(vcSimulationIdentifier, 0);
n5Exporter.initalizeDataControllers(testUser, dataServer, vcDataID);
n5Exporter = new N5Exporter(exportService, testUser, dataServer, vcDataID);
dataIdentifiers = new ArrayList<>(Arrays.asList(dataServer.getDataIdentifiers(new OutputContext(new AnnotatedFunction[0]), testUser, vcDataID)));

modelMesh = dataServer.getMesh(testUser, vcDataID);
Expand Down

0 comments on commit cdf1df1

Please sign in to comment.