Commit Graph

5378 Commits

Author SHA1 Message Date
Him188
ff6c63fafc EventDispatcher: launch Jobs UNDISPATCHED-ly 2021-05-31 00:15:02 +08:00
Karlatemp
76eaa34917 Fix tests
tests

Fix StateObserver error
2021-05-31 00:15:02 +08:00
Karlatemp
6f8d15ed37 Add test timeout 2021-05-31 00:15:02 +08:00
Karlatemp
49fdc19763 Bump junit to 5.7.2 2021-05-31 00:15:02 +08:00
Karlatemp
7e94eb66d4 Fix StackOverflowError 2021-05-31 00:15:02 +08:00
Him188
b5f47d5f91 Fix network:
- fix `awaitState`
- improve `EventDispatcher`
- use `EventDispatcher` in components
- use  `eventDispatcher.joinBroadcast()` in tests to remove delays and make tests stable
2021-05-31 00:15:01 +08:00
Him188
e6f7edadeb Fix doc on MessageSource 2021-05-30 23:44:52 +08:00
Him188
c93d6aa608 Add ForwardRefineTest 2021-05-30 22:51:26 +08:00
Him188
301deadbd1 Add test for #1273 2021-05-30 21:16:43 +08:00
Him188
2d10cc10be Add implementation notes for Listener 2021-05-30 09:42:24 +08:00
Him188
bcdff1336b
Kotlin 1.5 and dependencies updates (#1246)
* Kotlin 1.5 and dependencies updates

* Update mirai-console ref

* Use Kotlin 1.5.10

* 2.7-M1-dev-3

* Update console ref
2021-05-27 14:39:13 +08:00
Him188
5e25c0e25b Remove bintray 2021-05-25 12:25:53 +08:00
Him188
3584ca1e71 Improve performance of CombinedComponentStorage.size 2021-05-24 13:21:38 +08:00
Karlatemp
2e1fcfce7c
Update Messages.md 2021-05-23 16:51:45 +08:00
Him188
e769130829 Improve ComponentStorage.plus: accept nullable arguments 2021-05-11 09:01:12 +08:00
Him188
1d2b2377cf Add ConcurrentComponentStorage.creationStacktrace 2021-05-10 13:13:58 +08:00
Him188
f7f4ccf4f5 Correct state transition logic:
- Linear lifecycle for NetworkHandler: no chance to change state back to previous ones
- No reconnection attempts in NetworkHandler but in NHSelector
- Ensure clashing checks performed in setState
- Print closure exception in TestNettyNH.setStateOK
2021-05-09 21:05:32 +08:00
Him188
d43a77b590 Update docs and improve source code readability 2021-05-09 15:31:50 +08:00
Him188
2e1ec03daa Deprecate ForceOfflineException 2021-05-09 13:12:34 +08:00
Him188
6bc5c1204e Use withExceptionCollector in sendAndExpect 2021-05-09 13:12:34 +08:00
Him188
a62c570205 Add ExceptionCollector.throwLast 2021-05-09 13:12:33 +08:00
Him188
c9a3bb23ee Minor improvements after rebase 2021-05-09 00:54:48 +08:00
Him188
e60dd20d7b Add AbstractNettyNHTest.setSsoProcessor 2021-05-09 00:54:48 +08:00
Him188
0584b44823 Fix imports 2021-05-09 00:54:48 +08:00
Karlatemp
b31ef37c8d Exception Handling; Normal login tests 2021-05-09 00:54:48 +08:00
Him188
d2f600f9bb Fix docs 2021-05-09 00:54:48 +08:00
Him188
e58db121dc Remove redundant properties 2021-05-09 00:54:48 +08:00
Karlatemp
361304b9f2 Fix NPE in StateConnecting 2021-05-09 00:54:48 +08:00
Him188
b53e546743 Prototype EventDispatcher 2021-05-09 00:54:48 +08:00
Him188
5d3130448c Add NHSupport.setState safe overload and fix tests 2021-05-09 00:54:48 +08:00
Him188
1bb1b18f98 Improve logging in components
- Fix duplicated event logs
- Specify logger name for AccountSecretsManager
- Fix OtherClientUpdater logger
- Unify ServerList logger
- SubLogger.isEnabled
2021-05-09 00:54:48 +08:00
Him188
060004644e Add writeAndFlushOrCloseAsync to handle exception on send properly 2021-05-09 00:54:48 +08:00
Him188
d755ebf7ee Use topLevelEventLogger instead of MiraiLogger.TopLevel for non-BotEvent events 2021-05-09 00:54:48 +08:00
Him188
a77b52e7d3 Add bot argument to PushReqResponse and filter in ConfigPushProcessorImpl 2021-05-09 00:54:48 +08:00
Him188
d14ed0cecd Dispatch events in Bot scope 2021-05-09 00:54:48 +08:00
Him188
b62e39b4d1 Set state to CLOSED on failure during connecting 2021-05-09 00:54:48 +08:00
Him188
23b296692e api dump 2021-05-09 00:54:48 +08:00
Him188
f684b148d3 Remove notes that was for rewrite 2021-05-09 00:54:48 +08:00
Him188
61bc657417 Extract some logic out of QQAndroidBot 2021-05-09 00:54:48 +08:00
Him188
58d2081494 Add suppress for ExperimentalSerializationApi 2021-05-09 00:54:48 +08:00
Him188
35884182af Fix and improve event logging 2021-05-09 00:54:48 +08:00
Him188
d73f5a2692 Review BotConfiguration and implement relevant configs, implement alive heartbeat, fix behavior on resume 2021-05-09 00:54:48 +08:00
Him188
6e06406a3a Support network selector retry 2021-05-09 00:54:48 +08:00
Him188
83a81961ca Properly suspend coroutine is not available for send 2021-05-09 00:54:48 +08:00
Him188
eb80a4836b Remove all unstable kotlin.Duration usages 2021-05-09 00:54:48 +08:00
Him188
a7a4879d05 Improve logging 2021-05-09 00:54:48 +08:00
Him188
5fa54114c1 Fix sso and event logging 2021-05-09 00:54:48 +08:00
Him188
971685a2b0 Fix state resume 2021-05-09 00:54:48 +08:00
Him188
95d634233c Close bot if first login failed 2021-05-09 00:54:48 +08:00
Him188
35a6d12dde Test: network scope closed on bot close 2021-05-09 00:54:48 +08:00