Use SIGINT instead of SIGTERM to support Windows.

This commit is contained in:
Andrey Rakhmatullin 2023-09-24 23:31:46 +04:00
parent 4b5fb9b5a6
commit eb5e2e79ba
1 changed files with 3 additions and 3 deletions

View File

@ -528,7 +528,7 @@ class CrawlerProcessSubprocess(ScriptRunnerMixin, unittest.TestCase):
p = PopenSpawn(args, timeout=5)
p.expect_exact("Spider opened")
p.expect_exact("Crawled (200)")
p.kill(signal.SIGTERM)
p.kill(signal.SIGINT)
p.expect_exact("shutting down gracefully")
p.expect_exact("Spider closed (shutdown)")
p.wait()
@ -538,9 +538,9 @@ class CrawlerProcessSubprocess(ScriptRunnerMixin, unittest.TestCase):
p = PopenSpawn(args, timeout=5)
p.expect_exact("Spider opened")
p.expect_exact("Crawled (200)")
p.kill(signal.SIGTERM)
p.kill(signal.SIGINT)
p.expect_exact("shutting down gracefully")
p.kill(signal.SIGTERM)
p.kill(signal.SIGINT)
p.expect_exact("forcing unclean shutdown")
p.wait()