I was encountered the error above when mqtt-client CallbackConnection runs in junit, a publish method would be triggering the error [org.fusesource.hawtdispatch.internal.SerialDispatchQueue.assertExecuting(SerialDispatchQueue.java:145)]. But, it works ok when the same code runs in normal.
The same thing will be happen when execute CallbackConnection.connect、CallbackConnection.listener and CallbackConnection.subscribe in order, In junit, subscribe method will trigger the error but in normal work ok.
I was encountered the error above when mqtt-client CallbackConnection runs in junit, a publish method would be triggering the error [org.fusesource.hawtdispatch.internal.SerialDispatchQueue.assertExecuting(SerialDispatchQueue.java:145)]. But, it works ok when the same code runs in normal.
The same thing will be happen when execute CallbackConnection.connect、CallbackConnection.listener and CallbackConnection.subscribe in order, In junit, subscribe method will trigger the error but in normal work ok.
Is some different from junit and normal? Thx