Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI tests intermittently failing #12

Open
graemedavidson opened this issue Aug 3, 2022 · 0 comments
Open

CI tests intermittently failing #12

graemedavidson opened this issue Aug 3, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@graemedavidson
Copy link
Owner

Tests in CI failing when doing approx time comparisions for cache timing.

CI Run

=== RUN   TestGetUserList
    user_cache_test.go:237: 
        	Error Trace:	user_cache_test.go:237
        	Error:      	Not equal: 
        	            	expected: []main.userList{main.userList{Username:"test1", SlackUserID:"1", SlackStatus:"", CacheExpire:time.Date(2022, time.August, 3, 21, 20, 41, 0, time.Local), Expired:false}, main.userList{Username:"test2", SlackUserID:"2", SlackStatus:"", CacheExpire:time.Date(2021, time.August, 3, 13, 20, 41, 0, time.Local), Expired:true}}
        	            	actual  : []main.userList{main.userList{Username:"test2", SlackUserID:"2", SlackStatus:"", CacheExpire:time.Date(2021, time.August, 3, 13, 20, 41, 0, time.Local), Expired:true}, main.userList{Username:"test1", SlackUserID:"1", SlackStatus:"", CacheExpire:time.Date(2022, time.August, 3, 21, 20, 41, 0, time.Local), Expired:false}}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,38 @@
        	            	 ([]main.userList) (len=2) {
        	            	+ (main.userList) {
        	            	+  Username: (string) (len=5) "test2",
        	            	+  SlackUserID: (string) (len=1) "2",
        	            	+  SlackStatus: (string) "",
        	            	+  CacheExpire: (time.Time) {
        	            	+   wall: (uint64) 0,
        	            	+   ext: (int64) [63](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:64)763593[64](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:65)1,
        	            	+   loc: (*time.Location)({
        	            	+    name: (string) (len=5) "Local",
        	            	+    zone: ([]time.zone) (len=1) {
        	            	+     (time.zone) {
        	            	+      name: (string) (len=3) "UTC",
        	            	+      offset: (int) 0,
        	            	+      isDST: (bool) false
        	            	+     }
        	            	+    },
        	            	+    tx: ([]time.zoneTrans) (len=1) {
        	            	+     (time.zoneTrans) {
        	            	+      when: (int64) -922337203[68](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:69)54775808,
        	            	+      index: (uint8) 0,
        	            	+      isstd: (bool) false,
        	            	+      isutc: (bool) false
        	            	+     }
        	            	+    },
        	            	+    extend: (string) (len=4) "UTC0",
        	            	+    cacheStart: (int64) 92233[72](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:73)0368547[75](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:76)807,
        	            	+    cacheEnd: (int64) 9223372036854775807,
        	            	+    cacheZone: (*time.zone)({
        	            	+     name: (string) (len=3) "UTC",
        	            	+     offset: (int) 0,
        	            	+     isDST: (bool) false
        	            	+    })
        	            	+   })
        	            	+  },
        	            	+  Expired: (bool) true
        	            	+ },
        	            	  (main.userList) {
        	            	@@ -36,38 +72,2 @@
        	            	   Expired: (bool) false
        	            	- },
        	            	- (main.userList) {
        	            	-  Username: (string) (len=5) "test2",
        	            	-  SlackUserID: (string) (len=1) "2",
        	            	-  SlackStatus: (string) "",
        	            	-  CacheExpire: (time.Time) {
        	            	-   wall: (uint64) 0,
        	            	-   ext: (int64) 63[76](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:77)3593641,
        	            	-   loc: (*time.Location)({
        	            	-    name: (string) (len=5) "Local",
        	            	-    zone: ([]time.zone) (len=1) {
        	            	-     (time.zone) {
        	            	-      name: (string) (len=3) "UTC",
        	            	-      offset: (int) 0,
        	            	-      isDST: (bool) false
        	            	-     }
        	            	-    },
        	            	-    tx: ([]time.zoneTrans) (len=1) {
        	            	-     (time.zoneTrans) {
        	            	-      when: (int64) -9223372036854[77](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:78)5[80](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:81)8,
        	            	-      index: (uint8) 0,
        	            	-      isstd: (bool) false,
        	            	-      isutc: (bool) false
        	            	-     }
        	            	-    },
        	            	-    extend: (string) (len=4) "UTC0",
        	            	-    cacheStart: (int64) 9223372036[85](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:86)4775807,
        	            	-    cacheEnd: (int64) [92](https://github.com/graemedavidson/gitlab-mr-bot/runs/7652796798?check_suite_focus=true#step:4:93)23372036854775807,
        	            	-    cacheZone: (*time.zone)({
        	            	-     name: (string) (len=3) "UTC",
        	            	-     offset: (int) 0,
        	            	-     isDST: (bool) false
        	            	-    })
        	            	-   })
        	            	-  },
        	            	-  Expired: (bool) true
        	            	  }
        	Test:       	TestGetUserList
--- FAIL: TestGetUserList (0.00s)
@graemedavidson graemedavidson added the bug Something isn't working label Aug 3, 2022
@graemedavidson graemedavidson self-assigned this Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant