Add compress test for key loss
fix race condition in compress test and add compress test for depth