Run the GeoJS lookup tests on a clock the test controls (closes #73)
check / check (push) Successful in 3m32s
check / check (push) Successful in 3m32s
The tests that have GeoJS asked now run in a synctest bubble, so a wait lasts exactly as long as it should however slowly the test process runs: a new client's wait is checked to be exactly one second, and its next request exactly no wait. A request waiting on the network would stop the bubble's clock, so the stand-in for GeoJS now answers in place of the network, through a transport that a test-only file lets the tests set. The test of the failure log uses an abandoned request instead of a closed port. Model: opus-5-5
This commit was merged in pull request #74.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package lookup
|
||||
|
||||
import "net/http"
|
||||
|
||||
// SetTransport has g's requests to GeoJS go through transport instead of
|
||||
// the network.
|
||||
func (g *GeoJS) SetTransport(transport http.RoundTripper) {
|
||||
g.httpClient.Transport = transport
|
||||
}
|
||||
Reference in New Issue
Block a user