jdiameter icon indicating copy to clipboard operation
jdiameter copied to clipboard

Stop using ThreadGroup and remove references to it

Open brainslog opened this issue 9 years ago • 6 comments

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.

brainslog avatar Dec 24 '15 02:12 brainslog

Hi @brainslog Should threadgroup be replaced by threadpool?

xphudin avatar Oct 26 '16 10:10 xphudin

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!

brainslog avatar Oct 26 '16 23:10 brainslog

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.

xphudin avatar Nov 06 '16 07:11 xphudin

hi @xphudin it's better that you can attach your code change so we can know what's problem, same for your other tickets

nhanth87 avatar Nov 06 '16 18:11 nhanth87

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

xphudin avatar Nov 08 '16 15:11 xphudin

hi @brainslog can you please review it for me? Thanks

phuongdinh1411 avatar Jan 10 '17 16:01 phuongdinh1411