You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: downloader_integration_test.go
    path of file: ./repos/horahora/scheduler/internal/downloader
    
    the code of the file until where you have to start completion: package downloader

import (
	"context"
	"github.com/horahoradev/horahora/scheduler/internal/c
    
func TestConcurrentVideoDownloads(t *testing.T) {
	conf, err := config.New()
	if err != nil {
		log.Fatal(err)
	}

	dlChan := make(chan *models.CategoryDLRequest, 10)

	dlSuccessChannel := make(chan VideoJSON, 5)
	downloader := New(dlChan, "./", conf.Client, 5, dlSuccessChannel)

	ctx, cancel := context.WithCancel(context.Background())

	wg := &sync.WaitGroup{}

	go func() {
		wg.Add(1)
		err := downloader.SubscribeAndDownload(ctx)
		if err != nil {
			log.Fatal(err)
		}

		wg.Done()
	}()

	dlChan <- models.NewVideoDlRequest(proto.SupportedSite_niconico, models.Tag, "Oldest_Video", "1", conf.Conn, conf.Redlock)

	timeoutTicker := time.Tick(30 * time.Minute)

	select {
	case <-timeoutTicker:
		log.Fatal("wait for successful download timed out")

	case <-dlSuccessChannel:
	}

	// Cancel context, causing downloader to return after it's done with the current video download
	cancel()

	wg.Wait()
	<-dlSuccessChannel
}