Karlatemp
6f8d15ed37
Add test timeout
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
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
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
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
6bc5c1204e
Use withExceptionCollector
in sendAndExpect
2021-05-09 13:12:34 +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
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
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
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
Him188
062492c546
Test: NettyEndlessReconnectionTest
2021-05-09 00:54:48 +08:00
Him188
e584bc8ee8
Test: state tests
2021-05-09 00:54:48 +08:00
Him188
8db8e2fb03
Implement lifecycle management for network
2021-05-09 00:54:48 +08:00
Him188
f9ddf74d8e
Extract sync logic
2021-05-09 00:54:48 +08:00
Him188
076cd4997d
BotOfflineEventMonitor
2021-05-09 00:54:48 +08:00
Him188
3806d7ce78
fix componentName and smartToString
2021-05-09 00:54:48 +08:00
Him188
c35c2c97c8
CombinedStorageTest
2021-05-09 00:54:48 +08:00
Him188
b91bbfd2b8
Add NetworkHandlerFactory and tests for NetworkHandler
2021-05-09 00:54:48 +08:00
Him188
4f77abca87
Components misc implementations including (ABI changes):
...
- ComponentStorage and its impls
- ContactCacheService
- ContactUpdater
- HeartbeatProcessor
- SsoProcessor
- QQABot
2021-05-09 00:54:48 +08:00
Him188
7f2f1e9759
Rearrange network tests
2021-05-09 00:54:48 +08:00
Him188
9286d2124e
Add utils for tests
2021-05-09 00:54:48 +08:00
Him188
035085cf45
Remove state CONNECTION_LOST
2021-05-09 00:54:48 +08:00
Him188
84fa460b32
BotOnlineEvent, BotReloginEvent, BotOfflineEvent
2021-05-09 00:54:48 +08:00
Him188
d70475b8ba
Do not resume state while it is already closed
2021-05-09 00:54:48 +08:00
Him188
0e1b9da5e4
Fix test KeepAliveNetworkHandlerSelectorTest
2021-05-09 00:54:48 +08:00
Him188
79112bc98d
Fix LongMessageInternal missing parameter (due to merge)
2021-05-09 00:54:48 +08:00
Him188
35b80dc700
Processors
2021-05-09 00:54:48 +08:00
Him188
dd1b7404ea
IDEA removed my import
2021-05-09 00:54:48 +08:00
Him188
9db3a5ef4f
Rearrange packages for component system
2021-05-09 00:54:48 +08:00
Him188
0443fe4576
Prefer generified outgoing packets in all factories
2021-05-09 00:54:48 +08:00
Him188
82ad953b2b
Continuing implement states for NetworkHandler
2021-05-09 00:54:48 +08:00
Him188
03e12eb287
fix build
2021-05-09 00:54:48 +08:00
Him188
9ac0a8715c
Integrate ServerList into component system
2021-05-09 00:54:48 +08:00
Him188
3ec8a94096
ContactUpdater and ContactCacheService
2021-05-09 00:54:48 +08:00
Him188
51c1450202
ComponentStorage
2021-05-09 00:54:48 +08:00
Him188
05b2bfe059
Rearrange packages
2021-05-09 00:54:48 +08:00
Him188
70551167ba
States and connection impl
2021-05-09 00:54:48 +08:00
Him188
1fef89cf1c
Add state observer
2021-05-09 00:54:48 +08:00
Him188
8786f12d5d
Add NetworkHandler.isOk to avoid state == OK
2021-05-09 00:54:48 +08:00
Him188
4446479e80
Make QQAndroidClient lighter
2021-05-09 00:54:48 +08:00
Him188
f2b236341a
Decouple SSO login processor
2021-05-09 00:54:48 +08:00
Him188
997ad1eb63
Rearrange QQAndroidBot
2021-05-09 00:54:48 +08:00
Him188
1d053bd1bd
Extract netty utils
2021-05-09 00:54:48 +08:00
Him188
90f5e27b5f
Add AbstractKeepAliveNetworkHandlerSelectorTest
2021-05-09 00:54:48 +08:00
Him188
382c351e08
Implement NetworkHandlerSelector, serverList, and implement them into Bot
2021-05-09 00:54:48 +08:00
Him188
ff80434d2d
Migrate network logger and old sendWithoutExpect and sendAndExpect
2021-05-09 00:54:48 +08:00
Him188
840dd19dd0
Move EMPTY_BYTE_ARRAY to mirai-core-utils
2021-05-09 00:54:48 +08:00
Him188
097a478999
Relocates netty files to correct packages
2021-05-09 00:54:48 +08:00
Karlatemp
5f0b432220
NettyTestUnit
2021-05-09 00:54:48 +08:00
Him188
e293195391
Set state to StateClosed
appropriately and update docs
2021-05-09 00:54:48 +08:00
Him188
a143340141
Buildscript: Fix test artifacts included in main sourceset
2021-05-09 00:54:48 +08:00
Him188
d01f71ff8b
Remove rubbish; fix build; add todos
2021-05-09 00:54:48 +08:00
Him188
b844efb072
New network: framework infrastructure
2021-05-09 00:54:48 +08:00
sandtechnology
028bfa483c
Introduce MemberNick class and correct nameCard decoding, Fix #1151 ( #1231 )
...
* Introduce MemberNick class and correct nameCard decoding, Fix #1151
* Update comment for better understanding
Co-authored-by: Him188 <Him188@mamoe.net>
* Change var name in method for better understanding
Co-authored-by: Him188 <Him188@mamoe.net>
* Fix build
Co-authored-by: Him188 <Him188@mamoe.net>
2021-05-06 17:54:52 +08:00
sandtechnology
e459c76f92
OnlinePush.SidTicketExpired: Refresh token and register online ( #1242 )
...
* OnlinePush.SidTicketExpired: Refresh token and register online
* Also update key map
* Update package name to internal
Co-authored-by: Him188 <Him188@mamoe.net>
* Fix build
Co-authored-by: Him188 <Him188@mamoe.net>
2021-05-05 00:26:10 +08:00
Him188
6854252c77
Old network: re-init client on BotOfflineEvent.Force. #1205 for 2.7-M1
2021-05-04 12:47:27 +08:00
Him188
84d444843d
Old network: delete account secrets on BotOfflineEvent.Force. #1205 for 2.7-M1
2021-05-04 12:47:22 +08:00
Him188
57eb716e31
Add inline BotFactory.newBot
for Kotlin DSL. fix #1233 ( #1234 )
2021-05-02 13:51:32 +08:00
sandtechnology
0baaf9d587
Correct the seq logic, fix #1094 ( #1232 )
2021-05-02 13:51:21 +08:00
sandtechnology
db4c41f84a
Rework seq system ( #1230 )
...
* Rework seq system, should help #1209
* Use non-blocking (CAS) implement
* Making next seq code more clear for reading
* Fix mistake
2021-05-02 13:50:24 +08:00
Him188
70dc0a4da6
Remove kotlin.time.Duration usages ( #1215 )
...
* Remove kotlin.Duration usages
* Fix build
* update submodule console ref
2021-04-27 11:49:30 +08:00
sandtechnology
4e070baf34
Fix duplicate register packet ( #1214 )
2021-04-25 11:37:12 +08:00
Karlatemp
d3dc756a50
Drop empty UnsupportedMessage; fix #1210
2021-04-24 10:18:06 +08:00
Him188
5dcccd1402
Introduce base class for tests AbstractTest
2021-04-20 12:47:57 +08:00
Him188
6d58fb5514
Ensure fast login succeed, fix #1199
2021-04-18 14:37:16 +08:00
Karlatemp
28a8b8303a
Support receive nested ForwardMessages ( #1196 )
...
* Support receive nested ForwardMessages
* Tests
2021-04-17 16:09:32 +08:00
Karlatemp
0c93aeb425
Add RefineContext for refining ( #1195 )
...
* Add RefineContext for refining
* Add RefineContext argument
* Fix build
2021-04-17 11:45:02 +08:00
Karlatemp
83fa78b50d
Find nick from source; fix #1137
2021-04-17 09:28:11 +08:00
Hoshino Tented
1bf1e3686f
添加管理员修改功能 ( #1178 )
...
* add modifyAdmin
* 修复赋予相同权限时不会抛错并且仍然广播事件的 bug
* fix test failed
* fix test failed AGAIN
* fix myself
* 是这样吗
* i am so sorry :(
* fix fixed bug
2021-04-16 08:33:07 +08:00
Him188
f3d3130f2d
Support login cache and login without password. close #1158
2021-04-10 18:46:39 +08:00
Karlatemp
509c0d3d06
Fix mute all not working; Fix #1181
2021-04-09 19:19:03 +08:00