Skip to content

Commit 5886f0c

Browse files
onefloidMariusWirtz
authored andcommitted
test: stabilize native view update test
seed deterministic cube data to avoid flaky update assertions
1 parent 591bf75 commit 5886f0c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Tests/ViewService_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ def setUpClass(cls):
7474
element2 = "Element " + str(random.randint(1, 1000))
7575
element3 = "Element " + str(random.randint(1, 1000))
7676
cellset[(element1, element2, element3)] = random.randint(1, 1000)
77+
78+
# Add one deterministic cell for the native view update test.
79+
# Before the update, the view includes all members from dimension 0, so this value is visible.
80+
# After the update, dimension 0 is restricted to Elements 1-5, so Element 6 drops out.
81+
# That guarantees a different result even if the randomly generated data contains no matches.
82+
cellset[("Element 6", "Element 123", "Element 1")] = 999999
7783
cls.tm1.cells.write_values(cls.cube_name, cellset)
7884

7985
def setUp(self):

0 commit comments

Comments
 (0)