Showing posts from November, 2017

Gluster test: Using TESTS_EXPECTED_IN_LOOP

One frequently asked question on Gluster test framework is how to encapsulate the TEST/EXPECT/EXPECT_WITHIN statements within a function without getting "bad test plan" errors. I wrote a sample test to demonstrate the solution using TESTS_EXPECTED_IN_LOOP . The trick here is to count the number of invocations (n) of the "function" and then set TESTS_EXPECTED_IN_LOOP=(n-1) * (test statements in function). Yes, this trick does not work when the number of times a function is called is not deterministic. For such cases, you would have to prefix the function invocation with a test statement and lose the granularity of the tests.


#chamundihills #blog — Raghavendra Talur (@raghavendra_t) November 22, 2017 Source: @raghavendra_t November 22, 2017 at 08:11PM #blog — Raghavendra Talur (@raghavendra_t) November 7, 2017 Source: @raghavendra_t November 07, 2017 at 11:39PM