optimization for tests

Change-Id: If6513770150ac63ae99c4b0325efd5528e870aa0
Signed-off-by: Eyal Salomon <esalomon@mellanox.com>