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: syncer_test.go
    path of file: ./repos/asynq
    
    the code of the file until where you have to start completion: // Copyright 2020 Kentaro Hibino. All rights reserved.
// Use of this source code is governed by a MIT license
// that can be found in the LICENSE file.

package asynq

import (
	"context"
	"fmt"
	"sync"
	"testing"
	"time"

	"github.com/hibiken/asynq/internal/base"
	"github.com/hibiken/asynq/internal/rdb"
	h "github.com/hibiken/asynq/internal/testutil"
)

func Te
    
func TestSyncerDropsStaleRequests(t *testing.T) {
	const interval = time.Second
	syncRequestCh := make(chan *syncRequest)
	syncer := newSyncer(syncerParams{
		logger:     testLogger,
		requestsCh: syncRequestCh,
		interval:   interval,
	})
	var wg sync.WaitGroup
	syncer.start(&wg)

	var (
		mu sync.Mutex
		n  int // number of times request has been processed
	)

	for i := 0; i < 10; i++ {
		syncRequestCh <- &syncRequest{
			fn: func() error {
				mu.Lock()
				n++
				mu.Unlock()
				return nil
			},
			deadline: time.Now().Add(time.Duration(-i) * time.Second), // already exceeded deadline
		}
	}

	time.Sleep(2 * interval) // ensure that syncer runs at least once
	syncer.shutdown()

	mu.Lock()
	if n != 0 {
		t.Errorf("requests has been processed %d times, want 0", n)
	}
	mu.Unlock()
}