robotframework-sudslibrary
robotframework-sudslibrary copied to clipboard
Robot Keyword Run Extra Slow
Hi Robot, I am experiencing some robot test issues on docker. The test suites need about more than 4 hours, from time to time some cases failed due to keyword run over longer than normal needs. For example: Get Random to generate a random number, here its definition: def get_random(self): return random.randint(1,math.pow(2,31))
Here is one its result: KEYWORD ${hth} = HSSRammbock . Get Random Start / End / Elapsed: 20190918 16:18:10.885 / 20190918 16:18:33.960 / 00:00:23.075 16:18:33.960 INFO ${hth} = 1758648145 00:00:00.003KEYWORD ${ete} = HSSRammbock . Get Random Start / End / Elapsed: 20190918 16:18:33.961 / 20190918 16:18:33.964 / 00:00:00.003 16:18:33.962 INFO ${ete} = 1706015997
The run time over long happened randomly on any keyword and hard to reproduced. The following is another case with strace log:
344 23:12:30.986453 write(1</3>, "Charging.EPC-26086 MSCC Requirements.EPC-58207.EPC-58434 :: Verify if in CD...\n", 79) = 79 <0.000051>
344 23:12:30.986608 write(1</3>, "==============================================================================\n", 79) = 79 <0.000034>
344 23:12:30.986946 open("/tmp/s1.starttime", O_WRONLY|O_CREAT|O_APPEND, 0666) = 10</tmp/s1.starttime> <0.000044>
344 23:12:30.987050 lseek(10</tmp/s1.starttime>, 0, SEEK_END) = 4426 <0.000015>
344 23:12:30.987107 fstat(10</tmp/s1.starttime>, {st_dev=makedev(0, 60), st_ino=2885016, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=16, st_size=4426, st_atime=2019/09/30-17:21:07.109000000, st_mtime=2019/10/02-23:12:30.072000000, st_ctime=2019/10/02-23:12:30.072000000}) = 0 <0.000015>
344 23:12:30.987209 fstat(10</tmp/s1.starttime>, {st_dev=makedev(0, 60), st_ino=2885016, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=16, st_size=4426, st_atime=2019/09/30-17:21:07.109000000, st_mtime=2019/10/02-23:12:30.072000000, st_ctime=2019/10/02-23:12:30.072000000}) = 0 <0.000016>
344 23:12:30.987294 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f50f1cd6000 <0.000017>
344 23:12:30.987354 write(10</tmp/s1.starttime>, "EPC-58434: 20191002 23:12:30.725\n", 33) = 33 <0.000020>
344 23:12:30.987419 close(10</tmp/s1.starttime>) = 0 <0.000017>
344 23:12:30.987474 munmap(0x7f50f1cd6000, 4096) = 0 <0.000022>
344 23:12:30.999728 stat("/etc/localtime", {st_dev=makedev(0, 60), st_ino=1054970, st_mode=S_IFREG|0644, st_nlink=6, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=118, st_atime=2017/03/02-15:01:37, st_mtime=2017/03/02-15:01:37, st_ctime=2019/09/18-12:55:05.586000000}) = 0 <0.000024>
344 23:12:31.001988 write(3</opt/sps/spstests/ChargingRegressionSuite/fixOutput00.xml>, "\n\n<test id="s1-s4-s13-s4-t17" name="Delete Counter">\n
Currently the test suite EPC-58434 is running. But the following line are for previous suite EPC-58342:
344 23:12:31.001988 write(3</opt/sps/spstests/ChargingRegressionSuite/fixOutput00.xml>, "\n\n
From 23:12:31.380746, there is more than 8 seconds lost. Could we identify why there is 8 seconds gap? and how to avoid it?
Is there a way to flush all write contents to output.xml right away after suite end?