Skip to content

Commit 0c377cf

Browse files
committed
Improve test robustness
1 parent a7807e2 commit 0c377cf

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/test_files/function/call/fsm_info.test

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ True
5050
-STATEMENT CALL fsm_info() return sum(num_pages) > 0
5151
---- 1
5252
True
53-
# copy for new table should reuse the old pages
53+
# copy for new table should reuse most of the old pages
5454
-STATEMENT COPY person1 FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/vPerson.csv";
5555
---- ok
56-
-STATEMENT CALL fsm_info() return *
57-
---- 0
56+
# allow margin equal to the largest page range for a column chunk in the table
57+
-STATEMENT CALL fsm_info() with sum(num_pages) as num_free_pages call storage_info('person1') with num_free_pages, max(num_pages) as largest_range return num_free_pages is null or largest_range >= num_free_pages
58+
---- 1
59+
True
5860

5961
-CASE FSMEmptyAfterFirstCopy
6062
-STATEMENT create node table person (ID INt64, fName StRING, gender INT64, isStudent BoOLEAN, isWorker BOOLEAN, age INT64, eyeSight DOUBLE, birthdate DATE, registerTime TIMESTAMP, lastJobDuration interval, workedHours INT64[], usedNames STRING[], courseScoresPerTerm INT64[][], grades INT64[4], height float, u UUID, PRIMARY KEY (ID));
@@ -89,8 +91,10 @@ True
8991
-STATEMENT CALL fsm_info() return sum(num_pages) > 0
9092
---- 1
9193
True
92-
# copying the same initial data to a new table should reuse the same pages
94+
# copying the same initial data to a new table should reuse most of the pages
9395
-STATEMENT COPY knows1 FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb/eKnows.csv";
9496
---- ok
95-
-STATEMENT call fsm_info() return *
96-
---- 0
97+
# allow margin equal to the largest page range for a column chunk in the table
98+
-STATEMENT CALL fsm_info() with sum(num_pages) as num_free_pages call storage_info('knows1') with num_free_pages, max(num_pages) as largest_range return num_free_pages is null or largest_range >= num_free_pages
99+
---- 1
100+
True

0 commit comments

Comments
 (0)