[test] set flag before starting client