From 606e824036c4dba34e0cad7a297599faf68f0bda Mon Sep 17 00:00:00 2001 From: Gerasimos Maropoulos Date: Thu, 27 Oct 2016 03:28:28 +0300 Subject: [PATCH] Fix travis test On normal pc is running but travis slows things... so timing is not a good idea to test, if that fails again I will remove this test from github entirely....... --- cache_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cache_test.go b/cache_test.go index 29c49caa..9c50865d 100644 --- a/cache_test.go +++ b/cache_test.go @@ -57,7 +57,7 @@ All features of Sundown are supported, including: // EXAMPLE: https://github.com/iris-contrib/examples/tree/master/cache_body func TestCacheCanRender(t *testing.T) { iris.ResetDefault() - iris.Config.CacheGCDuration = time.Duration(2) * time.Second + iris.Config.CacheGCDuration = time.Duration(10) * time.Second iris.Config.IsDevelopment = true defer iris.Close() var i = 1 @@ -71,7 +71,7 @@ func TestCacheCanRender(t *testing.T) { ctx.Markdown(iris.StatusOK, testMarkdownContents) } - expiration := time.Duration(15 * time.Second) + expiration := time.Duration(1 * time.Minute) iris.Get("/", iris.Cache(bodyHandler, expiration)) @@ -80,7 +80,7 @@ func TestCacheCanRender(t *testing.T) { expectedBody := iris.SerializeToString("text/markdown", testMarkdownContents) e.GET("/").Expect().Status(iris.StatusOK).Body().Equal(expectedBody) - e.GET("/").Expect().Status(iris.StatusOK).Body().Equal(expectedBody) // the 15 seconds didnt' passed so it should work + e.GET("/").Expect().Status(iris.StatusOK).Body().Equal(expectedBody) // the 1 minute didnt' passed so it should work // travis... and time sleep not a good idea for testing, we will see what we can do other day, the cache is tested on examples too* /*e.GET("/").Expect().Status(iris.StatusOK).Body().Equal(expectedBody) // the cache still son the corrrect body so no StatusNoContent fires