Error in my functional test
Hi all, I wrote a functional test for my tool. Here is the test code. <tests> <test> <param name="source" value="history" /> <param name="fasta_input" value="tair9_chr4_10000.fas" ftype="fasta" /> <param name="source" value="pretrained" /> <param name="organism" value="arabidopsis" /> <output name="output" file="tair9_chr4_output.gff3" /> </test> </tests> While running the test I am getting an error message like the following. ERROR: test module functional in /home/galaxy/galaxy-2.1.2009/test ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/nose-0.9.1.dev_r101-py2.5.egg/nose/suite.py", line 46, in run self.setUp() File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/nose-0.9.1.dev_r101-py2.5.egg/nose/suite.py", line 200, in setUp try_run(self.module, names) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/nose-0.9.1.dev_r101-py2.5.egg/nose/util.py", line 200, in try_run return func() File "/home/galaxy/galaxy-2.1.2009/test/functional/__init__.py", line 88, in setup server = httpserver.serve( webapp, host=galaxy_test_host, port=galaxy_test_port, start_loop=False ) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 1257, in serve threadpool_options=threadpool_options) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 1107, in __init__ RequestHandlerClass, ssl_context) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 1087, in __init__ RequestHandlerClass, ssl_context) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 328, in __init__ HTTPServer.__init__(self, server_address, RequestHandlerClass) File "/usr/lib/python2.5/SocketServer.py", line 330, in __init__ self.server_bind() File "/usr/lib/python2.5/BaseHTTPServer.py", line 101, in server_bind SocketServer.TCPServer.server_bind(self) File "/usr/lib/python2.5/SocketServer.py", line 341, in server_bind self.socket.bind(self.server_address) File "<string>", line 1, in bind error: (98, 'Address already in use') ************************************************************ It will be great if you can give me a suggestion. Thanks in advance, Vipin T S
Hello Vipin, The port on which your test server instance is listening seems to be in use. Change the port in the following config setting in ~/test/functional/__init__.py: default_galaxy_test_port Greg Von Kuster Galaxy Development Team Vipin Thankam Sreedharan wrote:
Hi all,
I wrote a functional test for my tool. Here is the test code. <tests> <test> <param name="source" value="history" /> <param name="fasta_input" value="tair9_chr4_10000.fas" ftype="fasta" /> <param name="source" value="pretrained" /> <param name="organism" value="arabidopsis" /> <output name="output" file="tair9_chr4_output.gff3" /> </test> </tests>
While running the test I am getting an error message like the following. ERROR: test module functional in /home/galaxy/galaxy-2.1.2009/test ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/nose-0.9.1.dev_r101-py2.5.egg/nose/suite.py", line 46, in run self.setUp() File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/nose-0.9.1.dev_r101-py2.5.egg/nose/suite.py", line 200, in setUp try_run(self.module, names) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/nose-0.9.1.dev_r101-py2.5.egg/nose/util.py", line 200, in try_run return func() File "/home/galaxy/galaxy-2.1.2009/test/functional/__init__.py", line 88, in setup server = httpserver.serve( webapp, host=galaxy_test_host, port=galaxy_test_port, start_loop=False ) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 1257, in serve threadpool_options=threadpool_options) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 1107, in __init__ RequestHandlerClass, ssl_context) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 1087, in __init__ RequestHandlerClass, ssl_context) File "/home/galaxy/galaxy-2.1.2009/eggs/py2.5-noplatform/Paste-1.5.1-py2.5.egg/paste/httpserver.py", line 328, in __init__ HTTPServer.__init__(self, server_address, RequestHandlerClass) File "/usr/lib/python2.5/SocketServer.py", line 330, in __init__ self.server_bind() File "/usr/lib/python2.5/BaseHTTPServer.py", line 101, in server_bind SocketServer.TCPServer.server_bind(self) File "/usr/lib/python2.5/SocketServer.py", line 341, in server_bind self.socket.bind(self.server_address) File "<string>", line 1, in bind error: (98, 'Address already in use') ************************************************************ It will be great if you can give me a suggestion.
Thanks in advance, Vipin T S
_______________________________________________ galaxy-dev mailing list galaxy-dev@bx.psu.edu http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-dev
Greg Von Kuster wrote:
The port on which your test server instance is listening seems to be in use. Change the port in the following config setting in ~/test/functional/__init__.py:
default_galaxy_test_port
You can also override it on the command line with the GALAXY_TEST_PORT environment variable. --nate
Hi Greg & Nate, Thanks for your comments. I had changed the port and tried to run the test again, but it fails in an AssertionError ******************************** mGenePredict ( mgenepredict ) > Test-1 ... FAIL ====================================================================== FAIL: mGenePredict ( mgenepredict ) > Test-1 ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/galaxy/galaxy-2.1.2009/test/functional/test_toolbox.py", line 114, in test_tool self.do_it() File "/home/galaxy/galaxy-2.1.2009/test/functional/test_toolbox.py", line 54, in do_it self.verify_dataset_correctness( file ) File "/home/galaxy/galaxy-2.1.2009/test/base/twilltestcase.py", line 323, in verify_dataset_correctness if wait: self.wait() #wait for job to finish File "/home/galaxy/galaxy-2.1.2009/test/base/twilltestcase.py", line 617, in wait self.assertNotEqual(count, maxiter) AssertionError: 20 == 20 -------------------- >> begin captured stdout << --------------------- galaxy.tools.actions.upload INFO 2009-10-23 10:15:59,551 tool upload1 created job id 1 galaxy.tools.actions.upload INFO 2009-10-23 10:15:59,897 job id 1 ended ok, file size: 390.6 Kb Uploaded file: tair9_chr4_10000.fas , ftype: fasta , extra: {'ftype': 'fasta', 'value': 'tair9_chr4_10000.fas'} form 'tool_form' contains the following controls ( note the values ) control 0: <HiddenControl(tool_id=mgenepredict) (readonly)> control 1: <HiddenControl(tool_state=800254e3010000306361383263373039613935626566386164663739383835643632653966356537376437656533393a3762323236383639373337343666373237393566373637333566373037323635373437323631363936653635363432323361323032323762356332323733366637353732363336353563323233613230356332323730373236353734373236313639366536353634356332323263323035633232366637323637363136653639373336643563323233613230356332323635366336353637363136653733356332323263323035633232356635663633373537323732363536653734356636333631373336353566356635633232336132303330376432323263323032323566356637303631363736353566356632323361323033303263323032323638363937333734366637323739356637363733356636393665373436353732366536313663323233613230323237623563323237333666373537323633363535633232336132303563323236383639373337343666373237393563323232633230356332323636363137333734363135663639366537303735373435633232336132303331326332303563323235663566363337353732373236353665373435663633363137333635356635663563323233613230333037643232376471002e) (readonly)> control 2: <SubmitControl(runtool_btn=Execute) (readonly)> control 3: <SelectControl(history_vs_internal|source=[*history, internal])> base.twilltestcase DEBUG 2009-10-23 10:15:59,975 In submit_form, continuing, but caught exception: 'history_vs_internal|source' control 4: <SelectControl(history_vs_internal|fasta_input=[*1])> control 5: <SelectControl(history_vs_pretrained|source=[*pretrained, history])> control 6: <SelectControl(history_vs_pretrained|organism=[*elegans, arabidopsis])> control 7: <SubmitControl(runtool_btn=Execute) (readonly)> page_inputs (0) {'history_vs_pretrained|source': ['pretrained'], 'history_vs_pretrained|organism': ['arabidopsis']} galaxy.jobs DEBUG 2009-10-23 10:16:05,321 dispatching job 2 to local runner galaxy.jobs DEBUG 2009-10-23 10:16:05,502 job 2 dispatched galaxy.jobs.runners.local DEBUG 2009-10-23 10:16:05,770 executing: ~/bin/octave_start_script.sh "setup_mgene; galaxy_mgene_predict( '/tmp/tmpTpQQ6I/database/files/000/dataset_1.dat', '/tmp/tmpTpQQ6I/database/files/000/dataset_1_files', '', 'mgene:arabidopsis', '/tmp/tmpTpQQ6I/database/files/000/dataset_3.dat', '/tmp/tmpTpQQ6I/database/files/000/dataset_3_files', -1);">> /tmp/tmpTpQQ6I/database/files/000/dataset_2.dat ; ~/bin/cleanup_output.sh /tmp/tmpTpQQ6I/database/files/000/dataset_2.dat --------------------- >> end captured stdout << ---------------------- ---------------------------------------------------------------------- Ran 1 test in 227.029s ******************************** Many thanks in advance, Vipin T S
Hi Vipin, How long should your test take to run? That (admittedly unclear) error is indicating that the job didn't finish before the test suite gave up trying to check the outputs. --nate Vipin TS wrote:
Hi Greg & Nate,
Thanks for your comments. I had changed the port and tried to run the test again, but it fails in an AssertionError ******************************** mGenePredict ( mgenepredict ) > Test-1 ... FAIL
====================================================================== FAIL: mGenePredict ( mgenepredict ) > Test-1 ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/galaxy/galaxy-2.1.2009/test/functional/test_toolbox.py", line 114, in test_tool self.do_it() File "/home/galaxy/galaxy-2.1.2009/test/functional/test_toolbox.py", line 54, in do_it self.verify_dataset_correctness( file ) File "/home/galaxy/galaxy-2.1.2009/test/base/twilltestcase.py", line 323, in verify_dataset_correctness if wait: self.wait() #wait for job to finish File "/home/galaxy/galaxy-2.1.2009/test/base/twilltestcase.py", line 617, in wait self.assertNotEqual(count, maxiter) AssertionError: 20 == 20
-------------------- >> begin captured stdout << --------------------- galaxy.tools.actions.upload INFO 2009-10-23 10:15:59,551 tool upload1 created job id 1 galaxy.tools.actions.upload INFO 2009-10-23 10:15:59,897 job id 1 ended ok, file size: 390.6 Kb Uploaded file: tair9_chr4_10000.fas , ftype: fasta , extra: {'ftype': 'fasta', 'value': 'tair9_chr4_10000.fas'}
form 'tool_form' contains the following controls ( note the values ) control 0: <HiddenControl(tool_id=mgenepredict) (readonly)> control 1: <HiddenControl(tool_state=800254e3010000306361383263373039613935626566386164663739383835643632653966356537376437656533393a37623232363836393733373436663732373935663736373335663730373236353734373236313639366536353634323233613230323237623563323237333666373537323633363535633232336132303563323237303732363537343732363136393665363536343563323232633230356332323666373236373631366536393733366435633232336132303563323236353663363536373631366537333563323232633230356332323566356636333735373237323635366537343566363336313733363535663566356332323361323033303764323232633230323235663566373036313637363535663566323233613230333032633230323236383639373337343666373237393566373637333566363936653734363537323665363136633232336132303232376235633232373336663735373236333635356332323361323035633232363836393733373436663732373935633232326332303563323236363631373337343631356636393665373037353734356332323361323033313263323035633232356635663633373537323732363536653734356636333631373336353566356635633232336132 30333037643232376471002e) (readonly)> control 2: <SubmitControl(runtool_btn=Execute) (readonly)> control 3: <SelectControl(history_vs_internal|source=[*history, internal])> base.twilltestcase DEBUG 2009-10-23 10:15:59,975 In submit_form, continuing, but caught exception: 'history_vs_internal|source' control 4: <SelectControl(history_vs_internal|fasta_input=[*1])> control 5: <SelectControl(history_vs_pretrained|source=[*pretrained, history])> control 6: <SelectControl(history_vs_pretrained|organism=[*elegans, arabidopsis])> control 7: <SubmitControl(runtool_btn=Execute) (readonly)> page_inputs (0) {'history_vs_pretrained|source': ['pretrained'], 'history_vs_pretrained|organism': ['arabidopsis']} galaxy.jobs DEBUG 2009-10-23 10:16:05,321 dispatching job 2 to local runner galaxy.jobs DEBUG 2009-10-23 10:16:05,502 job 2 dispatched galaxy.jobs.runners.local DEBUG 2009-10-23 10:16:05,770 executing: ~/bin/octave_start_script.sh "setup_mgene; galaxy_mgene_predict( '/tmp/tmpTpQQ6I/database/files/000/dataset_1.dat', '/tmp/tmpTpQQ6I/database/files/000/dataset_1_files', '', 'mgene:arabidopsis', '/tmp/tmpTpQQ6I/database/files/000/dataset_3.dat', '/tmp/tmpTpQQ6I/database/files/000/dataset_3_files', -1);">> /tmp/tmpTpQQ6I/database/files/000/dataset_2.dat ; ~/bin/cleanup_output.sh /tmp/tmpTpQQ6I/database/files/000/dataset_2.dat
--------------------- >> end captured stdout << ---------------------- ---------------------------------------------------------------------- Ran 1 test in 227.029s ********************************
Many thanks in advance, Vipin T S
------------------------------------------------------------------------
_______________________________________________ galaxy-dev mailing list galaxy-dev@bx.psu.edu http://mail.bx.psu.edu/cgi-bin/mailman/listinfo/galaxy-dev
Hi Nate, My tool takes 30 minutes to give the result. The same set of data which I provided in the test case, I can see that the test is running for 4 minutes and creating this error message. Vipin T S
Vipin TS wrote:
Hi Nate,
My tool takes 30 minutes to give the result. The same set of data which I provided in the test case, I can see that the test is running for 4 minutes and creating this error message.
Vipin T S
Hi Vipin, For tests, it's preferable to create small test datasets and results so tool runs are quick and distribution sizes stay small. Is it possible to cut down your input sizes so the test will complete quickly? --nate
participants (4)
-
Greg Von Kuster
-
Nate Coraor
-
Vipin Thankam Sreedharan
-
Vipin TS