| 123456789101112131415161718192021 |
- package com.izouma.nineth;
- import com.izouma.nineth.service.DebounceTestService;
- import org.junit.Test;
- import org.springframework.beans.factory.annotation.Autowired;
- public class DebounceTest extends ApplicationTests {
- @Autowired
- private DebounceTestService debounceTestService;
- @Test
- public void testDebounce() throws InterruptedException {
- String[] names = new String[]{"name1"};
- int c = 0;
- for (int i = 0; i < 1000000000; i++) {
- Thread.sleep(1);
- debounceTestService.testDebounce(names[i % names.length], String.valueOf(++c));
- }
- }
- }
|