-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http3 #475
Merged
Merged
Http3 #475
Changes from 18 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
49e753c
Configuration add request client
34ec73e
add HttpServerManager
ca44653
change test case
14c258f
change get http3 host
d06f0bf
merge
f50b492
change config
3134eea
optimize SingleRequestMetrics
ad0b8d3
Merge branch 'develop' into http3
edbf5c6
change IRequestClient
fd3aa84
request client add clientid
9aa6b22
change transaction test case
9ae1012
change test case
617f373
change case
e1da31b
change case
9da1db8
Merge branch 'develop' of YangSen-qn:qiniu/android-sdk into http3
4324c80
change case
335cc21
add http server manager test case
4bc245e
server config add http3 logic
8b0ad76
change x-alt-svc parse
f0af7c5
build.gradle remove publish to local task
cb44fb8
http3 enable default to false
ef92a80
optimize request
d3aa558
chang IRequestClient api
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
library/src/androidTest/java/com/qiniu/android/BaseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
library/src/androidTest/java/com/qiniu/android/serverRegion/HttpServerManagerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.qiniu.android.serverRegion; | ||
|
||
import com.qiniu.android.BaseTest; | ||
import com.qiniu.android.http.serverRegion.HttpServerManager; | ||
|
||
public class HttpServerManagerTest extends BaseTest { | ||
|
||
public void testServer() { | ||
String host = "up.qiniu.com"; | ||
String ip = "192.168.1.1"; | ||
int duration = 10; | ||
HttpServerManager manager = HttpServerManager.getInstance(); | ||
assertFalse("null host and ip add success", manager.addHttp3Server(null, null, duration)); | ||
assertFalse("null host add success", manager.addHttp3Server(null, ip, duration)); | ||
assertFalse("null ip add success", manager.addHttp3Server(host, null, duration)); | ||
assertFalse("empty host and ip add success", manager.addHttp3Server("", "", duration)); | ||
assertFalse("empty host add success", manager.addHttp3Server("", ip, duration)); | ||
assertFalse("empty ip add success", manager.addHttp3Server(host, "", duration)); | ||
assertFalse("liveDuration < 0 add success", manager.addHttp3Server(host, ip, -1)); | ||
|
||
manager.addHttp3Server(host, ip, duration); | ||
assertTrue("host ip should support", manager.isServerSupportHttp3(host, ip)); | ||
|
||
assertFalse("null host and ip should not support", manager.isServerSupportHttp3(null, null)); | ||
assertFalse("null host should not support", manager.isServerSupportHttp3(null, ip)); | ||
assertFalse("null ip should not support", manager.isServerSupportHttp3(host, null)); | ||
|
||
assertFalse("empty host and ip should not support", manager.isServerSupportHttp3("", "")); | ||
assertFalse("empty host should not support", manager.isServerSupportHttp3("", ip)); | ||
assertFalse("empty ip should not support", manager.isServerSupportHttp3(host, "ip")); | ||
|
||
assertFalse("no exist host and ip should not support", manager.isServerSupportHttp3("host", "ip")); | ||
assertFalse("no exist hos should not support", manager.isServerSupportHttp3("host", ip)); | ||
assertFalse("no exist ip should not support", manager.isServerSupportHttp3(host, "ip")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YangSen-qn 这个这么写不合适吧?