Codebase list golang-github-vbauerster-mpb / 2ce8ac5
refactoring: TestMaxWidthDistributor Vladimir Bauer 3 years ago
1 changed file(s) with 1 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
111111 }
112112 }
113113
114 // MaxWidthDistributor shouldn't stuck in the middle while removing or aborting a bar
115114 func TestMaxWidthDistributor(t *testing.T) {
116
117115 makeWrapper := func(f func([]chan int), start, end chan struct{}) func([]chan int) {
118116 return func(column []chan int) {
119117 start <- struct{}{}
125123 ready := make(chan struct{})
126124 start := make(chan struct{})
127125 end := make(chan struct{})
126 // mpb.MaxWidthDistributor shouldn't stuck in the middle while removing or aborting a bar
128127 mpb.MaxWidthDistributor = makeWrapper(mpb.MaxWidthDistributor, start, end)
129128
130129 total := 100