0

I'm running jenkins job and trying to set my environment from python 2 to 3. It's going pretty well now and my tests run well under python3 from jenkins. But when I try to run the same test under python2 the job stucks at stopping PabotLib.

job stucks at stopping PabotLib

However it runs perfectly from commandline. Any ideas?

matebende
  • 543
  • 1
  • 7
  • 21

1 Answers1

4

That issue usually happens if/when you start processes and/or open files during your test run and those processes/files are not stopped/closed.

rasjani
  • 7,372
  • 4
  • 22
  • 35
  • I'll have a look at that, thank. But that'd be pretty strange cause I havent changed anything in the test. – matebende Sep 30 '20 at 08:58
  • Well, if they are external processes, they can change without you changing any of your test code.. OS behaviour of stopping those can fail due to multiple reasons too. – rasjani Sep 30 '20 at 09:03
  • Specifically in windows .. Even robotframework's own tests failed to stop external processes at one point in Windows because "Terminate Process" keyword just didnt work correctly and for this reason, i made my own process killer helper for my personal project @ https://github.com/rasjani/robotframework-seleniumtestability/blob/master/src/Helpers/__init__.py to workaround similar issue.. – rasjani Sep 30 '20 at 09:08
  • Thx rasjani. What you said was right. The webdriver closes but the browser stays alive my fault. But I don't really understand why does it cause problem when it runs under python2 and not under python3 – matebende Sep 30 '20 at 09:10
  • Pure speculation: standard libraries (most likely psutil) has gotten some updates since moving out from python2.7 to 3.X .. Can't say for sure. – rasjani Sep 30 '20 at 09:15