mirror of
https://github.com/hibiken/asynq.git
synced 2025-09-19 05:17:30 +08:00
Add MemoryUsage field to QueueStats
This commit is contained in:
@@ -264,6 +264,7 @@ func TestInspectorCurrentStats(t *testing.T) {
|
||||
m6 := h.NewTaskMessageWithQueue("task6", nil, "low")
|
||||
now := time.Now()
|
||||
timeCmpOpt := cmpopts.EquateApproxTime(time.Second)
|
||||
ignoreMemUsg := cmpopts.IgnoreFields(QueueStats{}, "MemoryUsage")
|
||||
|
||||
inspector := NewInspector(getRedisConnOpt(t))
|
||||
|
||||
@@ -356,7 +357,7 @@ func TestInspectorCurrentStats(t *testing.T) {
|
||||
tc.qname, got, err, tc.want)
|
||||
continue
|
||||
}
|
||||
if diff := cmp.Diff(tc.want, got, timeCmpOpt); diff != "" {
|
||||
if diff := cmp.Diff(tc.want, got, timeCmpOpt, ignoreMemUsg); diff != "" {
|
||||
t.Errorf("r.CurrentStats(%q) = %v, %v, want %v, nil; (-want, +got)\n%s",
|
||||
tc.qname, got, err, tc.want, diff)
|
||||
continue
|
||||
|
Reference in New Issue
Block a user