arextest / arex-agent-java

Lightweight Java agent for traffic capture and replay, enhancing testing and debugging.
https://doc.arextest.com/
Apache License 2.0
416 stars 82 forks source link

[Bug] io.arex.agent.bootstrap.ctx.RunnableWrapper不支持有优先级的多线程 #516

Closed hanson772 closed 4 days ago

hanson772 commented 6 days ago

Search before asking

AREX Test Service

AREX Java Agent (arextest/arex-agent-java)

Current Behavior

项目使用了线程池,提交有优先级的线程,导致程序运行失败。 io.arex.agent.bootstrap.ctx.RunnableWrapper cannot be cast to java.lang.Comparable, caused by: {} java.lang.ClassCastException: io.arex.agent.bootstrap.ctx.RunnableWrapper cannot be cast to java.lang.Comparable at java.util.concurrent.PriorityBlockingQueue.siftUpComparable(PriorityBlockingQueue.java:358) at java.util.concurrent.PriorityBlockingQueue.offer(PriorityBlockingQueue.java:490) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1371) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:586)

Expected Behavior

1

Steps To Reproduce

1

Anything else

No response

Are you willing to submit a pull request to fix on your own?

bjwhy commented 5 days ago

i have met this issue too. RunnableWrapper needs to support java.lang.Comparable

YongwuHe commented 4 days ago

@bjwhy @hanson772 已经fix