File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
nextflow/src/test/groovy/nextflow/util
nf-httpfs/src/main/nextflow/file/http Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,16 @@ class KryoHelperTest extends Specification {
165
165
KryoHelper . deserialize(buffer). toUri() == new URI (' http://host.com/foo.txt' )
166
166
}
167
167
168
+ def ' should serialise xfilesystem' () {
169
+ when :
170
+ def uri = new URI (' https://host.com/path/foo.txt' )
171
+ def fs = FileHelper . getOrCreateFileSystemFor(new URI (' https://host.com/path/foo.txt' ))
172
+ def fsBuffer = KryoHelper . serialize(fs)
173
+ then :
174
+ KryoHelper . deserialize(fsBuffer). getClass(). getName() == ' nextflow.file.http.XFileSystem'
175
+ KryoHelper . deserialize(fsBuffer). getPath(" /path/foo.txt" ). toUri() == uri
176
+ }
177
+
168
178
@EqualsAndHashCode
169
179
static class Foo implements SerializableMarker {
170
180
String foo
Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ class XFileSystem extends FileSystem {
44
44
45
45
private URI base
46
46
47
+ /*
48
+ * Only needed to prevent serialization issues - see https://github.com/nextflow-io/nextflow/issues/5208
49
+ */
50
+ protected XFileSystem (){}
51
+
47
52
XFileSystem (XFileSystemProvider provider , URI base ) {
48
53
this . provider = provider
49
54
this . base = base
You can’t perform that action at this time.
0 commit comments