1010import io .frictionlessdata .tableschema .schema .Schema ;
1111import org .apache .commons .csv .CSVFormat ;
1212import org .junit .jupiter .api .Assertions ;
13+ import org .junit .jupiter .api .DisplayName ;
1314import org .junit .jupiter .api .Test ;
1415
1516import java .io .File ;
17+ import java .io .FileInputStream ;
1618import java .io .IOException ;
1719import java .math .BigInteger ;
1820import java .nio .file .Files ;
@@ -179,8 +181,6 @@ public void testInferTypesIntAndDates() throws Exception{
179181 @ Test
180182 public void testInferTypesIntBoolAndGeopoints () throws Exception {
181183 Table table = Table .fromSource (new File ("int_bool_geopoint_data.csv" ), getTestDataDirectory ());
182- //String sourceFileAbsPath = TableOtherTest.class.getResource("/fixtures/int_bool_geopoint_data.csv").getPath();
183- //Table table = new Table(sourceFileAbsPath);
184184
185185 // Infer
186186 Schema schema = table .inferSchema ();
@@ -197,18 +197,17 @@ public void testInferTypesIntBoolAndGeopoints() throws Exception{
197197 }
198198 }
199199
200- // FIXME too slow
201- /*
202200 @ Test
201+ @ DisplayName ("Infer Schema from huge Table" )
203202 public void testInferSchemaFromHugeTable () throws Exception {
204203 File f = new File ("data/gdp.csv" );
205- Table table = new Table(f, getTestDataDirectory());
204+ Table table = Table . fromSource (f , getTestDataDirectory ());
206205 Assertions .assertEquals (11507 , table .read ().size ());
207206 Schema schema = table .inferSchema (10 );
208207 File schemaFile = new File (getTestDataDirectory (), "schema/gdp_schema.json" );
209208 Schema expectedSchema = null ;
210209 try (FileInputStream fis = new FileInputStream (schemaFile )) {
211- expectedSchema = new Schema(fis, false);
210+ expectedSchema = Schema . fromJson (fis , false );
212211 }
213212
214213 if (!expectedSchema .equals (schema )) {
@@ -219,7 +218,7 @@ public void testInferSchemaFromHugeTable() throws Exception{
219218 }
220219 }
221220 Assertions .assertEquals (expectedSchema , schema );
222- }*/
221+ }
223222
224223 @ Test
225224 public void testIterateCastKeyedData () throws Exception {
0 commit comments