-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use pactBrokerClientTimeout setting for result publisher too (#183)
- Loading branch information
jbwheatley
authored
Oct 20, 2020
1 parent
cbdbb74
commit 2ab9e38
Showing
31 changed files
with
422 additions
and
464 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
sbt-scalapact-shared/src/main/scala/com/itv/scalapact/plugin/ScalaPactEnv.scala
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
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
86 changes: 42 additions & 44 deletions
86
...ttp4s-0-16a/src/test/scala/com/itv/scalapact/http4s16a/impl/ScalaPactHttpClientSpec.scala
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,44 +1,42 @@ | ||
//package com.itv.scalapact.http4s16a.impl | ||
// | ||
//import com.itv.scalapact.shared._ | ||
//import org.http4s.client.Client | ||
//import org.scalatest.{FunSpec, Matchers} | ||
//import scalaz.concurrent.Task | ||
// | ||
//import scala.concurrent.duration._ | ||
// | ||
//class ScalaPactHttpClientSpec extends FunSpec with Matchers { | ||
// | ||
// describe("Making an interaction request") { | ||
// | ||
// it("should be able to make and interaction request and get an interaction response") { | ||
// | ||
// val requestDetails = InteractionRequest( | ||
// method = Some("GET"), | ||
// headers = None, | ||
// query = None, | ||
// path = Some("/foo"), | ||
// body = None, | ||
// matchingRules = None | ||
// ) | ||
// | ||
// val responseDetails = InteractionResponse( | ||
// status = Some(200), | ||
// headers = None, | ||
// body = None, | ||
// matchingRules = None | ||
// ) | ||
// | ||
// val fakeCaller: (SimpleRequest, Client) => Task[SimpleResponse] = (_, _) => Task.now(SimpleResponse(200)) | ||
// | ||
// val result = new ScalaPactHttpClient(fakeCaller) | ||
// .doInteractionRequest("", requestDetails, 1.second, sslContextName = None) | ||
// .unsafePerformSync | ||
// | ||
// result shouldEqual responseDetails | ||
// | ||
// } | ||
// | ||
// } | ||
// | ||
//} | ||
package com.itv.scalapact.http4s16a.impl | ||
|
||
import com.itv.scalapact.shared._ | ||
import org.http4s.client.Client | ||
import org.scalatest.{FunSpec, Matchers} | ||
import scalaz.concurrent.Task | ||
|
||
class ScalaPactHttpClientSpec extends FunSpec with Matchers { | ||
|
||
describe("Making an interaction request") { | ||
|
||
it("should be able to make and interaction request and get an interaction response") { | ||
|
||
val requestDetails = InteractionRequest( | ||
method = Some("GET"), | ||
headers = None, | ||
query = None, | ||
path = Some("/foo"), | ||
body = None, | ||
matchingRules = None | ||
) | ||
|
||
val responseDetails = InteractionResponse( | ||
status = Some(200), | ||
headers = None, | ||
body = None, | ||
matchingRules = None | ||
) | ||
|
||
val fakeCaller: (SimpleRequest, Client) => Task[SimpleResponse] = (_, _) => Task.now(SimpleResponse(200)) | ||
|
||
val result = new ScalaPactHttpClient(null)(fakeCaller) | ||
.doInteractionRequest("", requestDetails) | ||
.unsafePerformSync | ||
|
||
result shouldEqual responseDetails | ||
|
||
} | ||
|
||
} | ||
|
||
} |
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.