Skip to content
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

Update test exception expectations + modify socket timeout exception #1698

Closed
wants to merge 1 commit into from

Conversation

nfuller
Copy link
Collaborator

@nfuller nfuller commented Jun 11, 2015

In anticipation of taking a new Okio version containing square/okio#154

Related to issue #1676.
Depends on square/okio#154

URLConnection should throw SocketTimeoutException for timeouts
not InterruptedIOException.

@@ -307,8 +308,8 @@ protected HttpOverSpdyTest(Protocol protocol){
try {
readAscii(connection.getInputStream(), Integer.MAX_VALUE);
fail("Should have timed out!");
} catch (IOException e){
assertEquals("timeout", e.getMessage());
} catch (SocketTimeoutException expected){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supernit: missing space ) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(though this was broken before; ugh)

@swankjesse
Copy link
Member

Awesome, LGTM

The one thing you're missing is you need to change pom.xml to reference the Okio snapshot. If you don't get to it I'll take care of that later.

@nfuller
Copy link
Collaborator Author

nfuller commented Jun 11, 2015

No hurry on my part for you accepting this: I wanted the upstream pull so I had something to reference in Android. With the M preview out there things are getting fairly advanced so I'm just cherry-picking.
(https://android-review.googlesource.com/#/c/154384/)

I'll get the nits sorted tomorrow.

Related to issue square#1676.
Depends on square/okio#154

URLConnection should throw SocketTimeoutException for timeouts
not InterruptedIOException.
@nfuller
Copy link
Collaborator Author

nfuller commented Jun 12, 2015

Nits done.

@swankjesse
Copy link
Member

Merged manually.

@swankjesse swankjesse closed this Jun 12, 2015
cm-gerrit pushed a commit to CyanogenMod/android_external_okhttp that referenced this pull request Oct 6, 2015
Contains upstream changes:
Okio: square/okio#154
OkHttp: square/okhttp#1698 (pending)

Bug: 21396523
(cherry-picked from commit b5f9076)

Change-Id: I4d44e973f906d41a622598e2293d4026fc1ed039
cm-gerrit pushed a commit to CyanogenMod/android_external_okhttp that referenced this pull request Oct 6, 2015
Contains upstream changes:
Okio: square/okio#154
OkHttp: square/okhttp#1698 (pending)

Bug: 21396523
(cherry-picked from commit b5f9076)

Change-Id: I4d44e973f906d41a622598e2293d4026fc1ed039
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants