test when sleep