robotframework
                                
                                 robotframework copied to clipboard
                                
                                    robotframework copied to clipboard
                            
                            
                            
                        Using python multiprocessing lib and logger from robot.api corrupts output.xml' file.
Robot versions: 7.0.1 Python 3.11 Amazon Linux image used
I have tests where I'm using python multiprocessing library. When I'm running them on AWS linux machine I'm getting an error "output.xml' failed: Incompatible child element 'arg' for 'test'". But when I'm running them locally in my MacOS environment everything is ok.
This issue occurs upon using logger from robot framework api lib. When two different process are trying to log some data, output.xml file gets corrupted. When logger is removed from functions that are used multiprocessing library everything is working:
Example:
from multiprocessing import Process
from robot.api import logger  # to import robot logger lib
def some_func(arg1):
      logger.info('Some arg {arg1})
processes = []
for i in range(2):
    p = Process(target=some_func, args=(i))
    processes.append(p)
for p in processes:
    p.start()
for p in processes:
    p.join()
Amazon Linux image was used Received error after test execution: 'output.xml' failed: Incompatible child element 'arg' for 'test'.