jdiameter
jdiameter copied to clipboard
Stop using ThreadGroup and remove references to it
Using ThreadGroup is not recommended and it has already brought some problems. It's usage should be replaced and references to it (docs, config) removed.
Hi @brainslog Should threadgroup be replaced by threadpool?
Hi @xphudin,
Yes, ThreadPool
or ExecutorService
should be good candidates. What do you think ? Would you be up to contribute on this ? That'd be awesome!
hi @brainslog , I have convert threadgroup into threadpool, unfortunately, I face with failing test with below infomation: 14:20:38,863 DEBUG [PeerTableImpl] Waited 250ms. Time remaining to wait: 500ms. 3 Thread still active. 14:20:39,114 DEBUG [PeerTableImpl] Waited 250ms. Time remaining to wait: 250ms. 3 Thread still active. 14:20:39,364 DEBUG [PeerTableImpl] Waited 250ms. Time remaining to wait: 0ms. 3 Thread still active. 14:20:39,365 INFO StackImpl(-)(-)(-)(-) Stopped Mobicents DIAMETER Stack v1.7.0-SNAPSHOT (-)(-)(-)(-)(-) Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 15.225 sec <<< FAILURE! - in org.mobicents.diameter.stack.functional.cca.base.CCASessionBasicFlowTest testBasicFlow0 Time elapsed: 6.804 sec <<< FAILURE! java.lang.AssertionError: java.lang.Exception: Request: null at org.mobicents.diameter.stack.functional.cca.base.CCASessionBasicFlowTest.testBasicFlow(CCASessionBasicFlowTest.java:157)
testBasicFlow1 Time elapsed: 8.414 sec <<< FAILURE! java.lang.AssertionError: java.lang.Exception: Request: null at org.mobicents.diameter.stack.functional.cca.base.CCASessionBasicFlowTest.testBasicFlow(CCASessionBasicFlowTest.java:157)
Results :
Failed tests: CCASessionBasicFlowTest.testBasicFlow:157 java.lang.Exception: Request: null CCASessionBasicFlowTest.testBasicFlow:157 java.lang.Exception: Request: null
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0
Currently, I still get stack with this issue.
hi @xphudin it's better that you can attach your code change so we can know what's problem, same for your other tickets
hi @brainslog @nhanth87 , I commited source code above, Can you please help me to figure out why many tests are failed? Thank you so much
hi @brainslog can you please review it for me? Thanks