Merge branch 'hotfix072901' into test6.9.9
Showing
1 changed file
with
2 additions
and
2 deletions
@@ -64,7 +64,7 @@ public class OrderHelpController { | @@ -64,7 +64,7 @@ public class OrderHelpController { | ||
64 | 60, TimeUnit.SECONDS, | 64 | 60, TimeUnit.SECONDS, |
65 | new ArrayBlockingQueue<>(1000), NamedThreadFactory.newThreadFactory("test")); | 65 | new ArrayBlockingQueue<>(1000), NamedThreadFactory.newThreadFactory("test")); |
66 | 66 | ||
67 | - IntStream.range(0, 100) | 67 | + IntStream.range(0, 10) |
68 | .forEach(i -> executorService.submit(() -> lockTest(key))); | 68 | .forEach(i -> executorService.submit(() -> lockTest(key))); |
69 | ExecutorServiceUtils.shutdownAndAwaitTermination(executorService); | 69 | ExecutorServiceUtils.shutdownAndAwaitTermination(executorService); |
70 | return new ApiResponse.ApiResponseBuilder() | 70 | return new ApiResponse.ApiResponseBuilder() |
@@ -81,7 +81,7 @@ public class OrderHelpController { | @@ -81,7 +81,7 @@ public class OrderHelpController { | ||
81 | if (redisLock.acquire(redisLockKey, value, 5, TimeUnit.SECONDS)) { | 81 | if (redisLock.acquire(redisLockKey, value, 5, TimeUnit.SECONDS)) { |
82 | try { | 82 | try { |
83 | log.info("lock test {}, {} i got the lock", key, value); | 83 | log.info("lock test {}, {} i got the lock", key, value); |
84 | - Thread.sleep(RandomUtils.nextInt(10, 50)); | 84 | + Thread.sleep(RandomUtils.nextInt(4000, 5000)); |
85 | } catch (InterruptedException e) { | 85 | } catch (InterruptedException e) { |
86 | 86 | ||
87 | } finally { | 87 | } finally { |
-
Please register or login to post a comment