From fc8bba0451f0ea3f3e8feb3308b888ca8408f893 Mon Sep 17 00:00:00 2001 From: Alejandro Durante Date: Sat, 20 Nov 2021 10:32:54 -0300 Subject: [PATCH] Update to go v1.17 --- .travis.yml | 1 + examples/dynamic_size/go.mod | 2 +- examples/fixed_size/go.mod | 2 +- examples/prometheus/go.mod | 2 +- examples/task_group/go.mod | 2 +- go.mod | 2 +- pond_blackbox_test.go | 8 ++++---- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 70c5eaa..cb67307 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ go: - 1.14.x - 1.15.x - 1.16.x + - 1.17.x # Enable Go Modules env: diff --git a/examples/dynamic_size/go.mod b/examples/dynamic_size/go.mod index 453e8db..5b18ea5 100644 --- a/examples/dynamic_size/go.mod +++ b/examples/dynamic_size/go.mod @@ -1,6 +1,6 @@ module github.com/alitto/pond/examples/dynamic_size -go 1.16 +go 1.17 require ( github.com/alitto/pond v1.5.1 diff --git a/examples/fixed_size/go.mod b/examples/fixed_size/go.mod index 973540f..54131d3 100644 --- a/examples/fixed_size/go.mod +++ b/examples/fixed_size/go.mod @@ -1,6 +1,6 @@ module github.com/alitto/pond/examples/fixed_size -go 1.16 +go 1.17 require ( github.com/alitto/pond v1.5.1 diff --git a/examples/prometheus/go.mod b/examples/prometheus/go.mod index 500203e..98e3b32 100644 --- a/examples/prometheus/go.mod +++ b/examples/prometheus/go.mod @@ -1,6 +1,6 @@ module github.com/alitto/pond/examples/fixed_size -go 1.16 +go 1.17 require ( github.com/alitto/pond v1.5.1 diff --git a/examples/task_group/go.mod b/examples/task_group/go.mod index d329728..07cfeb7 100644 --- a/examples/task_group/go.mod +++ b/examples/task_group/go.mod @@ -1,6 +1,6 @@ module github.com/alitto/pond/examples/task_group -go 1.16 +go 1.17 require ( github.com/alitto/pond v1.5.1 diff --git a/go.mod b/go.mod index b8b0057..c0a402f 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/alitto/pond -go 1.16 +go 1.17 diff --git a/pond_blackbox_test.go b/pond_blackbox_test.go index 0e7480b..de52402 100644 --- a/pond_blackbox_test.go +++ b/pond_blackbox_test.go @@ -141,16 +141,16 @@ func TestSubmitBefore(t *testing.T) { // Submit a long-running task var doneCount int32 - pool.SubmitBefore(func() { - time.Sleep(5 * time.Millisecond) + pool.Submit(func() { + time.Sleep(50 * time.Millisecond) atomic.AddInt32(&doneCount, 1) - }, 1*time.Millisecond) + }) // Submit a task that times out after 2ms pool.SubmitBefore(func() { time.Sleep(5 * time.Millisecond) atomic.AddInt32(&doneCount, 1) - }, 2*time.Millisecond) + }, 5*time.Millisecond) pool.StopAndWait()