(t *testing.T, store Store, extraOpts ...Option)
| 9693 | } |
| 9694 | |
| 9695 | func newTaskManagerForTestWithOptions(t *testing.T, store Store, extraOpts ...Option) *Service { |
| 9696 | t.Helper() |
| 9697 | |
| 9698 | now := time.Date(2026, 4, 14, 15, 0, 0, 0, time.UTC) |
| 9699 | counter := 0 |
| 9700 | options := []Option{ |
| 9701 | WithStore(store), |
| 9702 | WithManagerNow(func() time.Time { return now }), |
| 9703 | WithIDGenerator(func(prefix string) string { |
| 9704 | counter++ |
| 9705 | return prefix + "-test-" + strconv.Itoa(counter) |
| 9706 | }), |
| 9707 | } |
| 9708 | options = append(options, extraOpts...) |
| 9709 | manager, err := NewManager(options...) |
| 9710 | if err != nil { |
| 9711 | t.Fatalf("NewManager() error = %v", err) |
| 9712 | } |
| 9713 | return manager |
| 9714 | } |
| 9715 | |
| 9716 | func setupStaleDependencyReadScenario( |
| 9717 | t *testing.T, |
no test coverage detected