You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2022/09/05 18:34:59 UTC
[incubator-sedona] branch master updated: [SEDONA-160] Fix geoparquetIOTests.scala to cleanup after test (#680)
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sedona.git
The following commit(s) were added to refs/heads/master by this push:
new 18abae48 [SEDONA-160] Fix geoparquetIOTests.scala to cleanup after test (#680)
18abae48 is described below
commit 18abae4817b34438c1d1096bf01f0cd99d389170
Author: Kengo Seki <se...@apache.org>
AuthorDate: Tue Sep 6 03:34:55 2022 +0900
[SEDONA-160] Fix geoparquetIOTests.scala to cleanup after test (#680)
---
.../org/apache/sedona/sql/geoparquetIOTests.scala | 35 ++++++++++++++++++----
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/sql/src/test/scala/org/apache/sedona/sql/geoparquetIOTests.scala b/sql/src/test/scala/org/apache/sedona/sql/geoparquetIOTests.scala
index 21590ab1..ad4995dd 100644
--- a/sql/src/test/scala/org/apache/sedona/sql/geoparquetIOTests.scala
+++ b/sql/src/test/scala/org/apache/sedona/sql/geoparquetIOTests.scala
@@ -1,14 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.sedona.sql
+import org.apache.commons.io.FileUtils
import org.apache.spark.sql.SaveMode
import org.locationtech.jts.geom.Geometry
-import org.scalatest.BeforeAndAfter
+import org.scalatest.BeforeAndAfterAll
-class geoparquetIOTests extends TestBaseScala with BeforeAndAfter{
- var geoparquetdatalocation1: String = resourceFolder + "geoparquet/example1.parquet"
- var geoparquetdatalocation2: String = resourceFolder + "geoparquet/example2.parquet"
- var geoparquetdatalocation3: String = resourceFolder + "geoparquet/example3.parquet"
- var geoparquetoutputlocation: String = resourceFolder + "geoparquet/geoparquet_output/"
+import java.io.File
+
+class geoparquetIOTests extends TestBaseScala with BeforeAndAfterAll {
+ val geoparquetdatalocation1: String = resourceFolder + "geoparquet/example1.parquet"
+ val geoparquetdatalocation2: String = resourceFolder + "geoparquet/example2.parquet"
+ val geoparquetdatalocation3: String = resourceFolder + "geoparquet/example3.parquet"
+ val geoparquetoutputlocation: String = resourceFolder + "geoparquet/geoparquet_output/"
+
+ override def afterAll(): Unit = FileUtils.deleteDirectory(new File(geoparquetoutputlocation))
describe("GeoParquet IO tests"){
it("GEOPARQUET Test example1 i.e. naturalearth_lowers dataset's Read and Write"){