Skip to content

Commit

Permalink
fix race condition in windows_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdoret committed Oct 7, 2020
1 parent f8f4a57 commit 13430ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dnaglider/pkg/windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ func TestChunkGenome(t *testing.T) {
}
}
func TestConsumeChunks(t *testing.T) {
records := StreamGenome(TESTFILE, 1)
ref := make(map[int]KmerProfile)
ref[3] = FastaToKmers(TESTFILE, 3)
records := StreamGenome(TESTFILE, 1)
chunks := ChunkGenome(records, WINSIZE, WINSTRIDE, CHUNKSIZE)
expHeader := []string{"chrom", "start", "end", "GC", "GCSKEW", "ENTRO", "3MER"}
results := ConsumeChunks(chunks, []string{"GC", "GCSKEW", "ENTRO"}, ref)
for res := range results {

for res := range ConsumeChunks(chunks, []string{"GC", "GCSKEW", "ENTRO"}, ref) {
for i := range res.Header {
if res.Header[i] != expHeader[i] {
t.Errorf("Result header is incorrect.: %s", res.Header)
Expand Down

0 comments on commit 13430ca

Please sign in to comment.