Skip to content

Commit c46683c

Browse files
Fix test cases that check file uploadDate to use a more precise time
1 parent 660299a commit c46683c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libmongoc/tests/test-mongoc-gridfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ test_create_from_stream (void)
572572

573573
mongoc_gridfs_drop (gridfs, &error);
574574

575-
start = ((int64_t) time (NULL)) * 1000;
575+
start = _mongoc_get_real_time_ms ();
576576
stream =
577577
mongoc_stream_file_new_for_path (BINARY_DIR "/gridfs.dat", O_RDONLY, 0);
578578
ASSERT_OR_PRINT_ERRNO (stream, errno);
@@ -582,7 +582,7 @@ test_create_from_stream (void)
582582
ASSERT (file);
583583
ASSERT (mongoc_gridfs_file_save (file));
584584

585-
now = ((int64_t) time (NULL)) * 1000;
585+
now = _mongoc_get_real_time_ms ();
586586

587587
filter = tmp_bson (NULL);
588588
BSON_APPEND_VALUE (filter, "_id", mongoc_gridfs_file_get_id (file));

0 commit comments

Comments
 (0)