Skip to content

Commit

Permalink
fix: hit() 테스트 지연으로 실패하지 않도록 Thread.sleep 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
deepredk committed Oct 17, 2023
1 parent aa90f8c commit 04ed324
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import it.numble.hittracker.entity.Url;
import it.numble.hittracker.repository.DailyHitLogRepository;
import it.numble.hittracker.repository.HitRepository;
import it.numble.hittracker.repository.IsCreatedUrlRepository;
import it.numble.hittracker.repository.UrlRepository;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
Expand Down Expand Up @@ -37,7 +38,7 @@ public class HitTrackerServiceTests {
private DailyHitLogRepository dailyHitLogRepository;
@Autowired
private HitRepository hitRepository;

@BeforeEach
void setUp() {
hitRepository.flushAll();
Expand All @@ -60,12 +61,12 @@ void getHitInfo() {
}

@Test
@DisabledOnOs(value = OS.LINUX)
void hit() {
void hit() throws InterruptedException {
// given
String url = "http://test.com";

// when
Thread.sleep(500);
hitTrackerService.hit(url);

// then
Expand Down

0 comments on commit 04ed324

Please sign in to comment.