Skip to content

Commit 4ff77dd

Browse files
committed
ensure extended attribute is completely written
1 parent 10dba91 commit 4ff77dd

File tree

1 file changed

+3
-3
lines changed
  • jfuse-tests/src/test/java/org/cryptomator/jfuse/tests

1 file changed

+3
-3
lines changed

jfuse-tests/src/test/java/org/cryptomator/jfuse/tests/MirrorIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import java.time.Duration;
3737
import java.util.ArrayList;
3838
import java.util.List;
39-
import java.util.Set;
4039
import java.util.concurrent.TimeUnit;
4140

4241
@EnabledIf("hasSupportedImplementation")
@@ -227,8 +226,9 @@ public void setup() throws IOException {
227226
public void testSetxattr(String attrName) {
228227
var attrView = Files.getFileAttributeView(file, UserDefinedFileAttributeView.class);
229228
var attrValue = StandardCharsets.UTF_8.encode(attrName);
230-
231-
Assertions.assertDoesNotThrow(() -> attrView.write(attrName, attrValue));
229+
var expectedWrittenBytes = attrValue.limit();
230+
int bytesWritten = Assertions.assertDoesNotThrow(() -> attrView.write(attrName, attrValue));
231+
Assertions.assertEquals(expectedWrittenBytes, bytesWritten, "The extended attribute %s was not completely written.".formatted(attrName));
232232
}
233233

234234
@Order(2)

0 commit comments

Comments
 (0)