-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from renatoathaydes/dev
Next release
- Loading branch information
Showing
4 changed files
with
144 additions
and
49 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
kotlinVersion=1.6.10 | ||
kotestVersion=4.6.2 | ||
kotlin.stdlib.default.dependency=false | ||
rawHttpCoreVersion=2.5.1 | ||
rawHttpCliVersion=1.5.1 | ||
rawHttpDuplexVersion=1.4.1 | ||
rawHttpReqInEditVersion=0.4.1 | ||
rawHttpCookiesVersion=0.3.1 | ||
rawHttpCoreVersion=2.5.2 | ||
rawHttpCliVersion=1.5.2 | ||
rawHttpDuplexVersion=1.4.2 | ||
rawHttpReqInEditVersion=0.4.2 | ||
rawHttpCookiesVersion=0.3.2 |
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
27 changes: 27 additions & 0 deletions
27
rawhttp-core/src/test/kotlin/rawhttp/core/client/ClientDefaultOptionsTest.kt
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,27 @@ | ||
package rawhttp.core.client | ||
|
||
import io.kotest.matchers.types.shouldBeSameInstanceAs | ||
import io.kotest.matchers.types.shouldNotBeSameInstanceAs | ||
import org.junit.jupiter.api.Test | ||
import rawhttp.core.client.TcpRawHttpClient.DefaultOptions | ||
import java.net.URI | ||
|
||
class ClientDefaultOptionsTest { | ||
|
||
@Test | ||
fun doNotReuseSocketIfSchemeChanges() { | ||
val options = DefaultOptions() | ||
|
||
val httpSocket1 = options.getSocket(URI.create("http://example.org")) | ||
val httpsSocket1 = options.getSocket(URI.create("https://example.org")) | ||
val httpSocket2 = options.getSocket(URI.create("http://example.org")) | ||
val httpsSocket2 = options.getSocket(URI.create("https://example.org")) | ||
|
||
httpSocket1 shouldBeSameInstanceAs httpSocket2 | ||
httpsSocket1 shouldBeSameInstanceAs httpsSocket2 | ||
|
||
httpSocket1 shouldNotBeSameInstanceAs httpsSocket1 | ||
httpSocket2 shouldNotBeSameInstanceAs httpsSocket2 | ||
} | ||
|
||
} |
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