dianping / cat

CAT 作为服务端项目基础组件,提供了 Java, C/C++, Node.js, Python, Go 等多语言客户端,已经在美团点评的基础架构中间件框架(MVC框架,RPC框架,数据库框架,缓存框架等,消息队列,配置系统等)深度集成,为美团点评各业务线提供系统丰富的性能指标、健康状况、实时告警等。
Apache License 2.0
18.63k stars 5.42k forks source link

Fix test failures #2320

Open dserfe opened 10 months ago

dserfe commented 10 months ago

This PR is to fix a flaky test com.dianping.cat.message.context.MessageIdFactoryTest#testDefaultDomainInParallel in module cat-client, we found the problem when using the latest version.

Reproduce test failures

Fix

In order to avoid not all threads not finished before the assertions, the fix is to first wait the jobs to be finished pool.awaitTermination(1, TimeUnit.HOURS);, after that if al threads are done, then go to the following assertions.