This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.4.0
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/dev-1.4.0 by this push:
new a549dab9c fix: FsPathTest should skip windows (#4517)
a549dab9c is described below
commit a549dab9c052a7ebb2261d448860978012c84264
Author: CharlieYan <[email protected]>
AuthorDate: Fri May 5 18:26:21 2023 +0800
fix: FsPathTest should skip windows (#4517)
---
.../org/apache/linkis/common/io/FsPathTest.java | 62 ++++++++++++----------
1 file changed, 34 insertions(+), 28 deletions(-)
diff --git
a/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/io/FsPathTest.java
b/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/io/FsPathTest.java
index 0b83e9643..8aa03a74a 100644
---
a/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/io/FsPathTest.java
+++
b/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/io/FsPathTest.java
@@ -24,37 +24,43 @@ class FsPathTest {
@Test
public void testGetSchemaPath() {
- FsPath fsPath = new FsPath("hdfs://localhost:9000/tmp/data");
- String schemaPath = fsPath.getSchemaPath();
- Assertions.assertEquals(schemaPath, "hdfs://localhost:9000/tmp/data");
- Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
-
- fsPath = new FsPath("hdfs:///tmp/data");
- schemaPath = fsPath.getSchemaPath();
- Assertions.assertEquals(schemaPath, "hdfs:///tmp/data");
- Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
-
- fsPath = new FsPath("oss://linkis/tmp/data");
- schemaPath = fsPath.getSchemaPath();
- Assertions.assertEquals(schemaPath, "oss://linkis/tmp/data");
- Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+ // skip os: windows
+ if (!FsPath.WINDOWS) {
+ FsPath fsPath = new FsPath("hdfs://localhost:9000/tmp/data");
+ String schemaPath = fsPath.getSchemaPath();
+ Assertions.assertEquals(schemaPath, "hdfs://localhost:9000/tmp/data");
+ Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+
+ fsPath = new FsPath("hdfs:///tmp/data");
+ schemaPath = fsPath.getSchemaPath();
+ Assertions.assertEquals(schemaPath, "hdfs:///tmp/data");
+ Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+
+ fsPath = new FsPath("oss://linkis/tmp/data");
+ schemaPath = fsPath.getSchemaPath();
+ Assertions.assertEquals(schemaPath, "oss://linkis/tmp/data");
+ Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+ }
}
@Test
public void testGetUriString() {
- FsPath fsPath = new FsPath("hdfs://localhost:9000/tmp/data");
- String schemaPath = fsPath.getUriString();
- Assertions.assertEquals(schemaPath, "hdfs://localhost:9000/tmp/data");
- Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
-
- fsPath = new FsPath("hdfs:///tmp/data");
- schemaPath = fsPath.getUriString();
- Assertions.assertEquals(schemaPath, "hdfs:///tmp/data");
- Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
-
- fsPath = new FsPath("oss://linkis/tmp/data");
- schemaPath = fsPath.getUriString();
- Assertions.assertEquals(schemaPath, "oss://linkis/tmp/data");
- Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+ // skip os: windows
+ if (!FsPath.WINDOWS) {
+ FsPath fsPath = new FsPath("hdfs://localhost:9000/tmp/data");
+ String schemaPath = fsPath.getUriString();
+ Assertions.assertEquals(schemaPath, "hdfs://localhost:9000/tmp/data");
+ Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+
+ fsPath = new FsPath("hdfs:///tmp/data");
+ schemaPath = fsPath.getUriString();
+ Assertions.assertEquals(schemaPath, "hdfs:///tmp/data");
+ Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+
+ fsPath = new FsPath("oss://linkis/tmp/data");
+ schemaPath = fsPath.getUriString();
+ Assertions.assertEquals(schemaPath, "oss://linkis/tmp/data");
+ Assertions.assertEquals(fsPath.getPath(), "/tmp/data");
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]