inpho / inphosite

The InPhO API
https://inphoproject.org
15 stars 5 forks source link

Evaluation TestCases Failing #122

Closed alefrost closed 10 years ago

alefrost commented 11 years ago

The Evaluation UI and Evaluation Database test cases on the Unit Test page are failing. Not sure if issue is with actual evaluation submission/interface or if the problem is simply with the unit tests.

alefrost commented 10 years ago

It returns '403 Forbidden' error when the Evaluation UI test runs. However, I manually went to the page and tried doing an evaluation through the UI and it appeared to work correctly. I also tried including the authorization information as used in the entity create and delete functions and that didn't make a difference. Any thoughts?

JaimieMurdock commented 10 years ago

In inpho.tests, the following tests should be made:

test_ui_eval -> test_anon_eval "Test Anonymous Evaluation" test_database_eval -> test_anon_delete_eval test_auth_eval - NEW, uses auth test_auth_delete_eval - NEW, uses auth

On Fri, Oct 25, 2013 at 2:50 PM, alefrost notifications@github.com wrote:

It returns '403 Forbidden' error when the Evaluation UI test runs. However, I manually went to the page and tried doing an evaluation through the UI and it appeared to work correctly. I also tried including the authorization information as used in the entity create and delete functions and that didn't make a difference. Any thoughts?

— Reply to this email directly or view it on GitHubhttps://github.com/inpho/inphosite/issues/122#issuecomment-27116652 .

alefrost commented 10 years ago

existing functions can be fixed by adding "degree=1".

alefrost commented 10 years ago

Jaimie, I've tried appending '?degree=1' onto the strings for the evaluation url, but it doesn't seem to be helping. Here are the lines that make the requests:

self.conn.request("POST", "/idea/1488/relatedness/2166&degree=1")
self.conn.request("POST", "/idea/1488/generality/2166?degree=1")

any thoughts?

JaimieMurdock commented 10 years ago

We ended up determining that there were errors with the connections timing out instantaneously. I've started a new branch called "unittest" to debug this further. I also switched my dev server to make the requests on inpho.cogs.indiana.edu which is making things much easier. Hopefully a resolution soon

JaimieMurdock commented 10 years ago

I found a significant lead: http://stackoverflow.com/a/10876180

In test_eval_anon and test_eval_anon_delete, we are reusing the connection without setting a Keep-alive, so the connection dies before completing all of the tests.

JaimieMurdock commented 10 years ago

Adding in the reads fixed it, along with a slight delay between requests on the DELETE test.