diff --git a/tests/dump_test.c b/tests/dump_test.c
index a0f2f150c71fdfebc5c65ed9bea9f5f731601c60..b290190bfb7b0cf11ecc83836a21d52ba29f7fb6 100644
--- a/tests/dump_test.c
+++ b/tests/dump_test.c
@@ -68,10 +68,14 @@ int main(int argc, char *argv[]) {
     dump_ensure(&d, 7 * chunk_size);
 
     /* Dump a few numbers. */
-    printf("dumping %i chunks...\n", chunk_size); fflush(stdout);
+    printf("dumping %i chunks...\n", chunk_size);
+    fflush(stdout);
     threadpool_map(&t, dump_mapper, NULL, chunk_size, 0, 1, &d);
   }
 
+  /* Sync the file, not necessary before dump_close, but just to test this. */
+  dump_sync(&d);
+
   /* Finalize the dump. */
   dump_close(&d);
 }