@@ -51,54 +51,11 @@ public static void clearTestoutputFolder() throws IOException {
5151 Files .createDirectory (TESTOUTPUT );
5252 }
5353
54- //@BeforeAll
55- //TODO: might be needed for Windows
56- public static void installZarritaInCondaEnv () throws IOException {
57- Process process = Runtime .getRuntime ().exec ("conda run -n " + CONDA_ENVIRONMENT + " pip install zarrita" );
58- //Process process = Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "conda run -n " + CONDA_ENVIRONMENT + " pip install zarrita"});
59-
60- BufferedReader stdError = new BufferedReader (new InputStreamReader (process .getErrorStream ()));
61- String s ;
62- boolean environmentLocationNotFound = false ;
63- while ((s = stdError .readLine ()) != null ) {
64- System .err .println (s );
65- if (s .contains ("EnvironmentLocationNotFound" )) {
66- environmentLocationNotFound = true ;
67-
68- }
69- }
70- if (environmentLocationNotFound ) {
71- System .out .println ("creating conda environment: " + CONDA_ENVIRONMENT );
72- process = Runtime .getRuntime ().exec ("conda create --name " + CONDA_ENVIRONMENT + " -y" );
73- System .out .println ("exec: conda create --name " + CONDA_ENVIRONMENT + " -y" );
74- BufferedReader stdInput = new BufferedReader (new InputStreamReader (process .getInputStream ()));
75- while ((s = stdInput .readLine ()) != null ) {
76- System .out .println (s );
77- }
78- stdError = new BufferedReader (new InputStreamReader (process .getErrorStream ()));
79- while ((s = stdError .readLine ()) != null ) {
80- System .err .println (s );
81- }
82-
83- process = Runtime .getRuntime ().exec ("conda run -n " + CONDA_ENVIRONMENT + " pip install zarrita" );
84- System .out .println ("exec: conda run -n " + CONDA_ENVIRONMENT + " pip install zarrita" );
85-
86- stdInput = new BufferedReader (new InputStreamReader (process .getInputStream ()));
87- while ((s = stdInput .readLine ()) != null ) {
88- System .out .println (s );
89- }
90- stdError = new BufferedReader (new InputStreamReader (process .getErrorStream ()));
91- while ((s = stdError .readLine ()) != null ) {
92- System .err .println (s );
93- }
94- }
95- }
96-
9754 @ ParameterizedTest
9855 @ ValueSource (strings = {"blosc" , "gzip" , "zstd" , "bytes" , "transpose" , "sharding" , "crc32c" })
9956 public void testReadFromZarrita (String codec ) throws IOException , ZarrException , InterruptedException {
100- String command = "zarrita/bin/python" ;
10157
58+ String command = "venv_zarrita/bin/python" ;
10259 ProcessBuilder pb = new ProcessBuilder (command , ZARRITA_WRITE_PATH .toString (), codec , TESTOUTPUT .toString ());
10360 Process process = pb .start ();
10461
0 commit comments