Commit Graph

20 Commits

Author SHA1 Message Date
Manjusaka 79840bc1c6 support run HTTP server with specific net.Listener (#2023) 2019-09-30 09:12:22 +08:00
Dan Markham 094f9a9105 v1.4.0 + #1631 (remove go1.6/go1,7 support) (#1851)
* remove go1.6 support

* remove build tag

* remove todo

* remove go1.6 support: https://github.com/gin-gonic/gin/pull/1383/commits

* update readme

* remove go1.7 support

* fix embedmd error

* test

* revert it

* revert it

* remove context_17

* add pusher test

* v1.4.0 rc1
2019-05-07 18:32:32 +08:00
Dmitry Kutakov 5acf660117 fix travis freeze on concurrent test (#1761) 2019-02-04 09:27:00 +08:00
Dmitry Kutakov b056a34bdc fix errcheck warnings (#1739) 2019-01-18 09:32:53 +08:00
Dmitry Kutakov 807368579f fix test - auto choose port number (#1719) 2018-12-28 10:26:29 +08:00
Yoshiki Nakagawa 66b47a8068 feat(server): Implements RunFd method (#1609) 2018-11-06 10:28:51 +08:00
Sergey Ponomarev cfa092f4f0 Fix LoadHTML* tests (#1559)
Digging into the test code base I've found out that some of the tests for `LoadHTML*` methods are not reliable and efficient. They use timeouts to be sure that goroutine with the server has started. And even more, in old implementation, the server started only once – all the new instances silently failed due to the occupied network port.

Here is a short overview of the proposed changes: 
- it's not necessary to rely on timeouts, the server starts listening synchronously and returns control when it is ready
- once the server is run, it's stopped after a test passes
- dry out http server setup
- magic with empty closure return is eliminated 
- preserve router.RunTLS coverage with integration tests
2018-10-16 08:48:41 +08:00
James Pettyjohn e9f187f60a removed use of sync.pool from HandleContext and added test coverage (#1565)
As per #1230 there is an issue when using HandleContext where the context of the request is returned to the context sync.Pool before the parent request has finished, causing context to be used in a non-thread safe manner.

I've removed the bug by not entering the context back in the pool and leaving that to ServeHTTP.

There was no test coverage for this function so I've also added the test to cover it. As the bug only happens when there are concurrent requests, the tests issues hundreds of concurrent requests. Without the bug fixed the tests do consistently recreate the error.
2018-10-01 10:49:39 +08:00
Boris Borshevsky 6f94fd05c9 Linting and optimizing struct memory signature. (#1184)
* fix cleanPath spell (#969)

* linter and optimize structs
2017-11-29 10:50:14 +08:00
Bo-Yi Wu 1e1e4fc867 Add Makefile to check the following thing (#947)
* Add Makefile to check the following thing.

* vet check
* fmt check
* embedmd check
* misspell check

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove unused variable.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-12 21:50:42 -05:00
田欧 4ad3baf44e Add license for some files (#940) 2017-06-12 01:04:52 -05:00
田欧 d922143bc5 lint code for import (#939) 2017-06-11 21:40:15 -05:00
Bo-Yi Wu b8be9df642 docs: add graceful-shutdown example for go 1.8 (#835)
* docs: add graceful-shutdown example for go 1.8

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-16 10:38:30 -05:00
bigwheel 3a040f8550 Add integration test using httptest 2016-02-24 02:44:52 +09:00
Manu Mtz-Almeida 704d690ac0 Removes debug code in unit tests 2015-08-16 18:39:41 +02:00
Manu Mtz-Almeida ce2201c392 router.Run() can be called without parameters. #405 2015-08-16 16:19:51 +02:00
Manu Mtz-Almeida 21979d6a99 Completes integration test 2015-06-03 05:25:50 +02:00
Kevin Mulvey b235d14ca1 compare the byte array 2015-06-02 20:52:33 -04:00
Kevin Mulvey da5be64c9f test standard router 2015-05-31 17:50:26 -04:00
Kevin Mulvey b512566acf unix socket integration test 2015-05-31 17:50:26 -04:00