| 34 | func (o *customOutput) CanShard() bool { return false } |
| 35 | |
| 36 | func (o *customOutput) Run(in <-chan baker.OutputRecord, upch chan<- string) error { |
| 37 | // Simulate a new file for each received record |
| 38 | nfiles := 0 |
| 39 | for range in { |
| 40 | fpath := path.Join(o.path, nthFile(nfiles)) |
| 41 | if err := os.WriteFile(fpath, nil, 0664); err != nil { |
| 42 | return err |
| 43 | } |
| 44 | nfiles++ |
| 45 | upch <- fpath |
| 46 | time.Sleep(o.sleep) |
| 47 | } |
| 48 | |
| 49 | return nil |
| 50 | } |
| 51 | |
| 52 | func testIntegrationS3(callStop bool) func(t *testing.T) { |
| 53 | return func(t *testing.T) { |