????写????????????????些???
???????????? ???????[ 2015/10/12 14:03:15 ] ?????????????????? ????????
?????????????????????????????????????
????"throw exception once reached the limit [naive??flaky]" in new ctx {
????for (i <- 1 to maxCount) {
????Future {
????throttler(waitForever())
????}
????}
????throttler {} must throwA[ThrottledException]
????????????? maxCount ?????????? Future{}???????? waitForever ???????煤????????????????????????????????????????????????? —— maxCount + 1????????????????????? ThrottledException ????????????????????????????????????????????????????? future ???????校?future ???????????????????????????
????????????????????????????????????????????????????????????违???????????????????械????????????????? waitForever ?????斜????????????????????????????些???????????? future ?????????????????????????????????????????????? sleep ????????些????????
????"throw exception once reached the limit [naive?? bad]" in new ctx {
????for (i <- 1 to maxCount) {
????Future {
????throttler(waitForever())
????}
????}
????Thread.sleep(1000)
????throttler {} must throwA[ThrottledException]
????}
??????????????????????????????????????????????????????????????????
?????????????????????????????煤??”????????”????谩?
??????????????????锟�??????????????????????????????????????
?????????????械??????????????? Google ????????
?????????????????????????(future)????????????????????????????????????? java.util.concurrent ????? CountDownLatch ??
????"throw exception once reached the limit [working]" in new ctx {
????val barrier = new CountDownLatch(maxCount)
????for (i <- 1 to maxCount) {
????Future {
????throttler {
????barrier.countDown()
????waitForever()
????}
????}
????}
????barrier.await(5?? TimeUnit.SECONDS) must beTrue
????throttler {} must throwA[ThrottledException]
????}
??????????? CountDownLatch ??????????????????????????????????????????????? 0?????????????????校????????些?????????? future???????? future ??????? countDown ?????????????? 1???????????? 0?????械? future ????????械? waitForever ?????????
?????????????????????? throttler ???????????写???????maxCount??????????????????????? throttler ????????????????????????????????????????????????????????? throttler??????????????????????????? 0 ???? CountDownLatch ???????????
????????些???????????榉�??????????贸?????????????????????????????????????榉�????????????????????????????????????????????????????????????????????????
????????
???????????????????????????????????????????????????????????????魏??????????????????????????????????????????? Thread.sleep ???????????????????????????????????
??????????????锟�????????????斜????????????????????????? CountDownLatch ???? Thead.sleep????? CountDownlatch ????????????????????????????????????????????????????????????????????????????????????????????????????? waiting ?????????? waitForever ?????????????????? Thread.sleep(Long.MAX_VALUE) ?????????????????????????????貌??????????
???????????????????????婕�???????????????????SPASVO小??(021-61079698-8054)?????????????????????????
??????
???写?貌??????????????????????写?娣�??伪??????????????????????????????????????????????????????械?效?????胁????谐??????????????????????胁?????????????胁????谐????????????????????????????胁????械???????????????????????????????????????卸??????????????????????????????ALM(??????????????)????????????????excel????????ALM(??????????????)????????????????????????????????????????????????写????????????????????????????????????????????????????????????????????????

???路???
??????????????????
2023/3/23 14:23:39???写?貌??????????
2023/3/22 16:17:39????????????????????些??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???路???????路
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????械????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????