Решение на HTTP сваляч от Даниел Тасков
Обратно към всички решения
Към профила на Даниел Тасков
Резултати
- 6 точки от тестове
- 0 бонус точки
- 6 точки общо
- 8 успешни тест(а)
- 5 неуспешни тест(а)
Код
Лог от изпълнението
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.003s
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.003s
panic: test timed out after 1s
goroutine 26 [running]:
testing.startAlarm.func1()
/usr/local/go/src/testing/testing.go:703 +0x132
created by time.goFunc
/usr/local/go/src/time/sleep.go:129 +0x3a
goroutine 1 [chan receive]:
testing.RunTests(0x5e4f58, 0x671e20, 0xd, 0xd, 0x1)
/usr/local/go/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc82003fef8, 0xc820062510)
/usr/local/go/src/testing/testing.go:494 +0x70
main.main()
_/tmp/d20160101-5892-1lm7ec/_test/_testmain.go:78 +0x116
goroutine 23 [chan receive]:
_/tmp/d20160101-5892-1lm7ec.TestNonCacheableRequestsFast(0xc8200a2090)
/tmp/d20160101-5892-1lm7ec/solution_test.go:395 +0x862
testing.tRunner(0xc8200a2090, 0x671ee0)
/usr/local/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:561 +0x86d
goroutine 24 [semacquire]:
sync.runtime_Semacquire(0xc82005e778)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc82005e774)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc82005e740, 0x7fd304aee580, 0xc820066510)
/tmp/d20160101-5892-1lm7ec/solution.go:65 +0x3a1
created by _/tmp/d20160101-5892-1lm7ec.TestNonCacheableRequestsFast
/tmp/d20160101-5892-1lm7ec/solution_test.go:377 +0x59f
goroutine 25 [semacquire]:
sync.runtime_Semacquire(0xc8200625f4)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200625f0)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc82005e740, 0x7fd304aee580, 0xc820066570)
/tmp/d20160101-5892-1lm7ec/solution.go:49 +0x1f0
created by _/tmp/d20160101-5892-1lm7ec.TestNonCacheableRequestsFast
/tmp/d20160101-5892-1lm7ec/solution_test.go:388 +0x772
exit status 2
FAIL _/tmp/d20160101-5892-1lm7ec 1.006s
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.003s
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.003s
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.043s
panic: test timed out after 1s
goroutine 10 [running]:
testing.startAlarm.func1()
/usr/local/go/src/testing/testing.go:703 +0x132
created by time.goFunc
/usr/local/go/src/time/sleep.go:129 +0x3a
goroutine 1 [chan receive]:
testing.RunTests(0x5e4f58, 0x671e20, 0xd, 0xd, 0x1)
/usr/local/go/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc82003fef8, 0xc820010650)
/usr/local/go/src/testing/testing.go:494 +0x70
main.main()
_/tmp/d20160101-5892-1lm7ec/_test/_testmain.go:78 +0x116
goroutine 6 [chan receive]:
_/tmp/d20160101-5892-1lm7ec.TestCacheSize(0xc82008e000)
/tmp/d20160101-5892-1lm7ec/solution_test.go:293 +0xb5d
testing.tRunner(0xc82008e000, 0x671eb0)
/usr/local/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:561 +0x86d
goroutine 17 [semacquire]:
sync.runtime_Semacquire(0xc820010784)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc820010780)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc820016700, 0x7f4b9d9d15a8, 0xc820010730)
/tmp/d20160101-5892-1lm7ec/solution.go:49 +0x1f0
created by _/tmp/d20160101-5892-1lm7ec.TestCacheSize
/tmp/d20160101-5892-1lm7ec/solution_test.go:292 +0xb3a
goroutine 9 [semacquire]:
sync.runtime_Semacquire(0xc820016738)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc820016734)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc820016700, 0x7f4b9d9d15a8, 0xc820010730)
/tmp/d20160101-5892-1lm7ec/solution.go:65 +0x3a1
created by _/tmp/d20160101-5892-1lm7ec.TestCacheSize
/tmp/d20160101-5892-1lm7ec/solution_test.go:285 +0x9e9
exit status 2
FAIL _/tmp/d20160101-5892-1lm7ec 1.005s
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.043s
panic: test timed out after 1s
goroutine 23 [running]:
testing.startAlarm.func1()
/usr/local/go/src/testing/testing.go:703 +0x132
created by time.goFunc
/usr/local/go/src/time/sleep.go:129 +0x3a
goroutine 1 [chan receive]:
testing.RunTests(0x5e4f58, 0x671e20, 0xd, 0xd, 0x1)
/usr/local/go/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc82003fef8, 0xc820062510)
/usr/local/go/src/testing/testing.go:494 +0x70
main.main()
_/tmp/d20160101-5892-1lm7ec/_test/_testmain.go:78 +0x116
goroutine 20 [chan receive]:
_/tmp/d20160101-5892-1lm7ec.TestNonCacheableRequestsFast(0xc8200a4000)
/tmp/d20160101-5892-1lm7ec/solution_test.go:395 +0x862
testing.tRunner(0xc8200a4000, 0x671ee0)
/usr/local/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:561 +0x86d
goroutine 21 [semacquire]:
sync.runtime_Semacquire(0xc82005e638)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc82005e634)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc82005e600, 0x7efd6f358580, 0xc820066420)
/tmp/d20160101-5892-1lm7ec/solution.go:65 +0x3a1
created by _/tmp/d20160101-5892-1lm7ec.TestNonCacheableRequestsFast
/tmp/d20160101-5892-1lm7ec/solution_test.go:377 +0x59f
goroutine 22 [semacquire]:
sync.runtime_Semacquire(0xc8200625a4)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200625a0)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc82005e600, 0x7efd6f358580, 0xc820066480)
/tmp/d20160101-5892-1lm7ec/solution.go:49 +0x1f0
created by _/tmp/d20160101-5892-1lm7ec.TestNonCacheableRequestsFast
/tmp/d20160101-5892-1lm7ec/solution_test.go:388 +0x772
exit status 2
FAIL _/tmp/d20160101-5892-1lm7ec 1.006s
panic: test timed out after 1s
goroutine 11 [running]:
testing.startAlarm.func1()
/usr/local/go/src/testing/testing.go:703 +0x132
created by time.goFunc
/usr/local/go/src/time/sleep.go:129 +0x3a
goroutine 1 [chan receive]:
testing.RunTests(0x5e4f58, 0x671e20, 0xd, 0xd, 0x1)
/usr/local/go/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc82003fef8, 0xc820010650)
/usr/local/go/src/testing/testing.go:494 +0x70
main.main()
_/tmp/d20160101-5892-1lm7ec/_test/_testmain.go:78 +0x116
goroutine 6 [chan receive]:
_/tmp/d20160101-5892-1lm7ec.TestStopWithQueue(0xc82008e000)
/tmp/d20160101-5892-1lm7ec/solution_test.go:454 +0xad6
testing.tRunner(0xc82008e000, 0x671ef8)
/usr/local/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:561 +0x86d
goroutine 7 [semacquire]:
sync.runtime_Semacquire(0xc8200166b8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166b4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc820016680, 0x7faee1d015a8, 0xc82000a510)
/tmp/d20160101-5892-1lm7ec/solution.go:65 +0x3a1
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueue
/tmp/d20160101-5892-1lm7ec/solution_test.go:439 +0x890
goroutine 8 [semacquire]:
sync.runtime_Semacquire(0xc8200106f4)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200106f0)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc820016680, 0x7faee1d015a8, 0xc82000a540)
/tmp/d20160101-5892-1lm7ec/solution.go:49 +0x1f0
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueue
/tmp/d20160101-5892-1lm7ec/solution_test.go:441 +0x928
goroutine 17 [semacquire]:
sync.runtime_Semacquire(0xc8200166b8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166b4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).Stop(0xc820016680)
/tmp/d20160101-5892-1lm7ec/solution.go:72 +0x2d
_/tmp/d20160101-5892-1lm7ec.TestStopWithQueue.func3(0xc82001e3c0, 0x7faee1d01578, 0xc820016680, 0xc82001e420)
/tmp/d20160101-5892-1lm7ec/solution_test.go:446 +0x35
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueue
/tmp/d20160101-5892-1lm7ec/solution_test.go:448 +0x9f0
goroutine 10 [semacquire]:
sync.runtime_Semacquire(0xc8200166b8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166b4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc820016680, 0x7faee1d015a8, 0xc82000a5a0)
/tmp/d20160101-5892-1lm7ec/solution.go:38 +0x43
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueue
/tmp/d20160101-5892-1lm7ec/solution_test.go:451 +0xa95
exit status 2
FAIL _/tmp/d20160101-5892-1lm7ec 1.006s
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.033s
PASS
ok _/tmp/d20160101-5892-1lm7ec 0.053s
panic: test timed out after 1s
goroutine 10 [running]:
testing.startAlarm.func1()
/usr/local/go/src/testing/testing.go:703 +0x132
created by time.goFunc
/usr/local/go/src/time/sleep.go:129 +0x3a
goroutine 1 [chan receive]:
testing.RunTests(0x5e4f58, 0x671e20, 0xd, 0xd, 0x1)
/usr/local/go/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc82003fef8, 0xc820010650)
/usr/local/go/src/testing/testing.go:494 +0x70
main.main()
_/tmp/d20160101-5892-1lm7ec/_test/_testmain.go:78 +0x116
goroutine 6 [chan receive]:
_/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum(0xc82008e000)
/tmp/d20160101-5892-1lm7ec/solution_test.go:633 +0x105c
testing.tRunner(0xc82008e000, 0x671f40)
/usr/local/go/src/testing/testing.go:456 +0x98
created by testing.RunTests
/usr/local/go/src/testing/testing.go:561 +0x86d
goroutine 7 [semacquire]:
sync.runtime_Semacquire(0xc8200166f8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166f4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc8200166c0, 0x7f0df393f5a8, 0xc82000a510)
/tmp/d20160101-5892-1lm7ec/solution.go:65 +0x3a1
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum
/tmp/d20160101-5892-1lm7ec/solution_test.go:612 +0xca0
goroutine 8 [semacquire]:
sync.runtime_Semacquire(0xc8200166f8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166f4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc8200166c0, 0x7f0df393f5a8, 0xc82000a5a0)
/tmp/d20160101-5892-1lm7ec/solution.go:65 +0x3a1
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum
/tmp/d20160101-5892-1lm7ec/solution_test.go:613 +0xd18
goroutine 17 [semacquire]:
sync.runtime_Semacquire(0xc8200166f8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166f4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc8200166c0, 0x7f0df393f5a8, 0xc82000a540)
/tmp/d20160101-5892-1lm7ec/solution.go:38 +0x43
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum
/tmp/d20160101-5892-1lm7ec/solution_test.go:616 +0xdd9
goroutine 18 [semacquire]:
sync.runtime_Semacquire(0xc8200106f4)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200106f0)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc8200166c0, 0x7f0df393f5a8, 0xc82000a5d0)
/tmp/d20160101-5892-1lm7ec/solution.go:49 +0x1f0
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum
/tmp/d20160101-5892-1lm7ec/solution_test.go:617 +0xe4e
goroutine 9 [semacquire]:
sync.runtime_Semacquire(0xc8200166f8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166f4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).Stop(0xc8200166c0)
/tmp/d20160101-5892-1lm7ec/solution.go:72 +0x2d
_/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum.func4(0xc82001e5a0, 0x7f0df393f578, 0xc8200166c0, 0xc82001e600)
/tmp/d20160101-5892-1lm7ec/solution_test.go:621 +0x35
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum
/tmp/d20160101-5892-1lm7ec/solution_test.go:623 +0xea1
goroutine 19 [semacquire]:
sync.runtime_Semacquire(0xc8200166f8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166f4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc8200166c0, 0x7f0df393f5a8, 0xc82000a600)
/tmp/d20160101-5892-1lm7ec/solution.go:38 +0x43
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum
/tmp/d20160101-5892-1lm7ec/solution_test.go:626 +0xf46
goroutine 20 [semacquire]:
sync.runtime_Semacquire(0xc8200166f8)
/usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200166f4)
/usr/local/go/src/sync/mutex.go:82 +0x1c4
_/tmp/d20160101-5892-1lm7ec.(*myRequester).AddRequest(0xc8200166c0, 0x7f0df393f5a8, 0xc82000a570)
/tmp/d20160101-5892-1lm7ec/solution.go:38 +0x43
created by _/tmp/d20160101-5892-1lm7ec.TestStopWithQueueFromForum
/tmp/d20160101-5892-1lm7ec/solution_test.go:627 +0xfbe
exit status 2
FAIL _/tmp/d20160101-5892-1lm7ec 1.006s
История (3 версии и 5 коментара)
Даниел обнови решението на 25.12.2015 17:24 (преди над 2 години)
Даниел обнови решението на 26.12.2015 21:24 (преди над 2 години)
Даниел обнови решението на 30.12.2015 01:26 (преди над 2 години)