Решение на Concurrent Crawling от Йончо Йончев
Обратно към всички решения
Към профила на Йончо Йончев
Резултати
- 0 точки от тестове
- 0 бонус точки
- 0 точки общо
- 0 успешни тест(а)
- 11 неуспешни тест(а)
Код
Лог от изпълнението
[/tmp/go-build101840554/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWithNegativeWorkersCount -test.timeout=120s]
--- FAIL: TestWithNegativeWorkersCount-2 (0.00 seconds)
solution_test.go:148: Function should return error when workersCount is negative
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.006s
[/tmp/go-build540041390/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWithZeroWorkersCount -test.timeout=120s]
--- FAIL: TestWithZeroWorkersCount-2 (0.00 seconds)
solution_test.go:148: Function should return error when workersCount is zero
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.005s
[/tmp/go-build118639765/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWithInvalidCallback -test.timeout=120s]
--- FAIL: TestWithInvalidCallback-2 (0.00 seconds)
solution_test.go:148: Function should return error when callback is nil
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.006s
[/tmp/go-build864199687/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWithNilChannel -test.timeout=120s]
--- FAIL: TestWithNilChannel-2 (0.00 seconds)
solution_test.go:148: Function should return error when channel is uninitialized
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.006s
[/tmp/go-build284590730/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWithClosedChannelWhenStarting -test.timeout=120s]
--- FAIL: TestWithClosedChannelWhenStarting-2 (0.00 seconds)
solution_test.go:148: Function should return error when the urls channel was closed
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.006s
[/tmp/go-build521963873/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWithClosedChannelMidway -test.timeout=120s]
--- FAIL: TestWithClosedChannelMidway-2 (0.00 seconds)
solution_test.go:194: Function should have returned an error when urls channel was closed
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.007s
[/tmp/go-build898344635/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWhetherGlobalTimeoutIsHandled -test.timeout=120s]
--- FAIL: TestWhetherGlobalTimeoutIsHandled-2 (0.00 seconds)
solution_test.go:207: Function should have returned an error when the global timeout was reached
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.006s
[/tmp/go-build010355682/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestWithLoremIpsum -test.timeout=120s]
--- FAIL: TestWithLoremIpsum-2 (0.00 seconds)
solution_test.go:237: Function returned '' when it should have returned 'http://127.0.0.2:43262/lorem_ipsum'
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.006s
[/tmp/go-build709340275/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestIfTimeoutAndErrorCodesAreHonoured -test.timeout=120s]
--- FAIL: TestIfTimeoutAndErrorCodesAreHonoured-2 (0.00 seconds)
solution_test.go:267: Function returned '' when it should have returned 'http://127.0.0.2:52307/correct_page'
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.005s
[/tmp/go-build729096440/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestRaceCondition -test.timeout=120s]
--- FAIL: TestRaceCondition-2 (0.00 seconds)
solution_test.go:293: Function returned '' when it should have returned 'http://127.0.0.2:47821/fast_success'
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.010s
[/tmp/go-build951593471/_/tmp/d20150111-16649-1rgtz1l/_test/d20150111-16649-1rgtz1l.test -test.run=TestCloseChannelBeforeFinish -test.timeout=120s]
--- FAIL: TestCloseChannelBeforeFinish-2 (0.00 seconds)
solution_test.go:316: Function should have returned an error, channel was closed before it could finish
FAIL
exit status 1
FAIL _/tmp/d20150111-16649-1rgtz1l 0.012s
История (1 версия и 0 коментара)
Йончо обнови решението на 11.12.2014 16:31 (преди над 3 години)