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: logging_test.go
    path of file: ./repos/arvados/lib/crunchrun
    
    the code of the file until where you have to start completion: // Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: AGPL-3.0

package crunchrun

import (
	"bytes"
	"fmt"
	"io"
	"strings"
	"testing"
	"time"

	"git.arvados.org/arvados.git/sdk/go/arvados"
	"git.arvados.org/arvados.git/sdk/go/arvadosclient"
	. "gopkg.in/check.v1"
	check "gopkg.in/check.v1"
)

type LoggingTestSuite struct {
	client *arvados.Client
}

type TestTimestamper struct {
	count int
}

func (stamper *TestTimestamper) Timestamp(t time.Time) string {
	stamper.count++
	t, err := time.ParseInLocation(time.RFC3339Nano, fmt.Sprintf("2015-12-29T15:51:45.%09dZ", stamper.count), t.Location())
	if err != nil {
		panic(err)
	}
	return RFC3339Timestamp(t)
}

// Gocheck boilerplate
var _ = Suite(&LoggingTestSuite{})

func (s *LoggingTestSuite) SetUpTest(c *C) {
	s.client = arvados.NewClientFromEnv()
	crunchLogUpdatePeriod = time.Hour * 24 * 365
	crunchLogUpdateSize = 1 << 50
}

func (s *LoggingTestSuite) TestWriteLogs(c *C) 
    
func (s *LoggingTestSuite) TestLogUpdate(c *C) {
	for _, trial := range []struct {
		maxBytes    int64
		maxDuration time.Duration
	}{
		{1000, 10 * time.Second},
		{1000000, time.Millisecond},
	} {
		c.Logf("max %d bytes, %s", trial.maxBytes, trial.maxDuration)
		crunchLogUpdateSize = trial.maxBytes
		crunchLogUpdatePeriod = trial.maxDuration

		api := &ArvTestClient{}
		kc := &KeepTestClient{}
		defer kc.Close()
		cr, err := NewContainerRunner(s.client, api, kc, "zzzzz-zzzzzzzzzzzzzzz")
		c.Assert(err, IsNil)
		ts := &TestTimestamper{}
		cr.CrunchLog.Timestamper = ts.Timestamp
		w, err := cr.NewLogWriter("stdout")
		c.Assert(err, IsNil)
		stdout := NewThrottledLogger(w)
		stdout.Timestamper = ts.Timestamp

		c.Check(cr.logUUID, Equals, "")
		cr.CrunchLog.Printf("Hello %1000s", "space")
		for i, t := 0, time.NewTicker(time.Millisecond); i < 5000 && cr.logUUID == ""; i++ {
			<-t.C
		}
		c.Check(cr.logUUID, Not(Equals), "")
		cr.CrunchLog.Print("Goodbye")
		fmt.Fprint(stdout, "Goodbye\n")
		cr.CrunchLog.Close()
		stdout.Close()
		w.Close()

		mt, err := cr.LogCollection.MarshalManifest(".")
		c.Check(err, IsNil)
		// Block packing depends on whether there's an update
		// between the two Goodbyes -- either way the first
		// block will be 4dc76.
		c.Check(mt, Matches, `. 4dc76e0a212bfa30c39d76d8c16da0c0\+1038 (afc503bc1b9a828b4bb543cb629e936c\+78|90699dc22545cd74a0664303f70bc05a\+39 276b49339fd5203d15a93ff3de11bfb9\+39) 0:1077:crunch-run.txt 1077:39:stdout.txt\n`)
	}
}