On Sun, Dec 11, 2016 at 1:03 AM Dammina Sahabandu <damm...@apache.org>
wrote:

Hi Ryan,

I made a few minor comments, nothing big, I think we are almost there.


I have gone through your comments and committed the required changes to the
same branch. Please note that the changes are squashed to their respective
commits.


I tried running the unit tests on bloodhound trunk. There are some things
that need fixing. I will try to spend some time on that in the coming week.


That would be really great :)

Thanks,
Dammina


Thanks, looks good!

I made some changes and the tests are executable now. Prior to the changes
there were some import errors.

To run the tests, cd into the package directory, and run "python setup.py
test". Example:

$ cd bloodhound_relations
$ python setup.py test

I saw some failures in bloodhound_multiproduct. Would you mind taking a
look into the failures? We could start by checking whether you get the same
errors as I do. I'll append the failures I saw to the end of this email.

- Ryan

======================================================================
ERROR: test_batch_ticket_insert_after_upgrade
(multiproduct.tests.upgrade.EnvironmentUpgradeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/upgrade.py",
line 405, in test_batch_ticket_insert_after_upgrade
    db("""INSERT INTO ticket (summary) SELECT summary FROM tmp""")
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 122, in execute
    return self.connection.execute(query, params=params)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/db/util.py",
line 121, in execute
    cursor.execute(query, params)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 87, in execute
    return super(BloodhoundIterableCursor,
self).execute(translate_sql(self.env, sql), args=args)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/db/util.py",
line 66, in execute
    return self.cursor.execute(sql)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/db/sqlite_backend.py",
line 78, in execute
    result = PyFormatCursor.execute(self, *args)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/db/sqlite_backend.py",
line 56, in execute
    args or [])
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/db/sqlite_backend.py",
line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: 2 values for 3 columns

======================================================================
ERROR: test_missing_product
(multiproduct.tests.web_ui.ProductModuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 255, in test_missing_product
    self._dispatch(req, self.global_env)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 95, in _dispatch
    return RequestDispatcher(env).dispatch(req)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 224, in dispatch
    self._post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 338, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/admin/product_admin.py",
line 83, in post_process_request
    raise exc
TestAdminHandledException

======================================================================
ERROR: test_product_edit (multiproduct.tests.web_ui.ProductModuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 290, in test_product_edit
    self._dispatch(req, self.global_env)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 95, in _dispatch
    return RequestDispatcher(env).dispatch(req)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 224, in dispatch
    self._post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 338, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/admin/product_admin.py",
line 83, in post_process_request
    raise exc
TestAdminHandledException

======================================================================
ERROR: test_product_list (multiproduct.tests.web_ui.ProductModuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 175, in test_product_list
    self._dispatch(req, self.global_env)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 95, in _dispatch
    return RequestDispatcher(env).dispatch(req)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 224, in dispatch
    self._post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 338, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/admin/product_admin.py",
line 83, in post_process_request
    raise exc
TestAdminHandledException

======================================================================
ERROR: test_product_new (multiproduct.tests.web_ui.ProductModuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 197, in test_product_new
    self._dispatch(req, self.global_env)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 95, in _dispatch
    return RequestDispatcher(env).dispatch(req)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 224, in dispatch
    self._post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 338, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/admin/product_admin.py",
line 83, in post_process_request
    raise exc
TestAdminHandledException

======================================================================
ERROR: test_product_view (multiproduct.tests.web_ui.ProductModuleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 227, in test_product_view
    self._dispatch(req, self.global_env)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/web_ui.py",
line 95, in _dispatch
    return RequestDispatcher(env).dispatch(req)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 224, in dispatch
    self._post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/web/main.py",
line 338, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/admin/product_admin.py",
line 83, in post_process_request
    raise exc
TestAdminHandledException

======================================================================
FAIL: test_regression_bh_539
(multiproduct.tests.env.ProductEnvConfigTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/env.py",
line 742, in test_regression_bh_539
    "Expected component disabled")
AssertionError: Expected component disabled

======================================================================
FAIL: test_regression_bh_539_concurrent
(multiproduct.tests.env.ProductEnvConfigTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/env.py",
line 791, in test_regression_bh_539_concurrent
    "Expected component disabled")
AssertionError: Expected component disabled

======================================================================
FAIL: test_help_ok
(multiproduct.tests.admin.console.ProductTracAdminTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/admin/tests/console.py",
line 162, in test_help_ok
    self.assertEqual(expected_results, output)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/admin/tests/console.py",
line 145, in assertEqual
    output, diff()))
AssertionError: u'trac-admin - The Trac Administration Console
1.0.1\n\nUsage: trac-admin </path/to/projenv> [command [subcommand] [option
...]]\n\nInvoking trac-admin without command starts interactive
mode.\n\nhelp                 Show documentation\ninitenv
 Create and initialize a new environment\nattachment add       Attach a
file to a resource\nattachment export    Export an attachment from a
resource to a file or stdout\nattachment list      List attachments of a
resource\nattachment remove    Remove an attachment from a
resource\nchangeset added      Notify trac about changesets added to a
repository\nchangeset modified   Notify trac about changesets modified in a
repository\ncomponent add        Add a new component\ncomponent chown
 Change component ownership\ncomponent list       Show available
components\ncomponent remove     Remove/uninstall a component\ncomponent
rename     Rename a component\nconfig get           Get the value of the
given option in "trac.ini"\nconfig remove        Remove the specified
option from "trac.ini"\nconfig set           Set the value for the given
option in "trac.ini"\ndeploy               Extract static resources from
Trac and all plugins\nhotcopy              Make a hot backup copy of an
environment\nmilestone add        Add milestone\nmilestone completed  Set
milestone complete date\nmilestone due        Set milestone due
date\nmilestone list       Show milestones\nmilestone remove     Remove
milestone\nmilestone rename     Rename milestone\npermission add       Add
a new permission rule\npermission export    Export permission rules to a
file or stdout as CSV\npermission import    Import permission rules from a
file or stdin as CSV\npermission list      List permission
rules\npermission remove    Remove a permission rule\npriority add
Add a priority value option\npriority change      Change a priority
value\npriority list        Show possible ticket priorities\npriority order
      Move a priority value up or down in the list\npriority remove
 Remove a priority value\nrepository add       Add a source
repository\nrepository alias     Create an alias for a
repository\nrepository list      List source repositories\nrepository
remove    Remove a source repository\nrepository resync    Re-synchronize
trac with repositories\nrepository set       Set an attribute of a
repository\nrepository sync      Resume synchronization of
repositories\nresolution add       Add a resolution value
option\nresolution change    Change a resolution value\nresolution list
 Show possible ticket resolutions\nresolution order     Move a resolution
value up or down in the list\nresolution remove    Remove a resolution
value\nsession add          Create a session for the given sid\nsession
delete       Delete the session of the specified sid\nsession list
List the name and email for the given sids\nsession purge        Purge all
anonymous sessions older than the given age\nsession set          Set the
name or email attribute of the given sid\nseverity add         Add a
severity value option\nseverity change      Change a severity
value\nseverity list        Show possible ticket severities\nseverity order
      Move a severity value up or down in the list\nseverity remove
 Remove a severity value\nticket remove        Remove ticket\nticket_type
add      Add a ticket type\nticket_type change   Change a ticket
type\nticket_type list     Show possible ticket types\nticket_type order
 Move a ticket type up or down in the list\nticket_type remove   Remove a
ticket type\nupgrade              Upgrade database to current
version\nversion add          Add version\nversion list         Show
versions\nversion remove       Remove version\nversion rename       Rename
version\nversion time         Set version date\nwiki dump            Export
wiki pages to files named by title\nwiki export          Export wiki page
to file or stdout\nwiki import          Import wiki page from file or
stdin\nwiki list            List wiki pages\nwiki load            Import
wiki pages from files\nwiki remove          Remove wiki page\nwiki rename
       Rename wiki page\nwiki replace         Replace the content of wiki
pages from files (DANGEROUS!)\nwiki upgrade         Upgrade default wiki
pages to current version\n' != u'trac-admin - The Trac Administration
Console 1.0.1\n\nUsage: trac-admin </path/to/projenv> [command [subcommand]
[option ...]]\n\nInvoking trac-admin without command starts interactive
mode.\n\nhelp                 Show documentation\ninitenv
 Create and initialize a new environment\nattachment add       Attach a
file to a resource\nattachment export    Export an attachment from a
resource to a file or stdout\nattachment list      List attachments of a
resource\nattachment remove    Remove an attachment from a
resource\nchangeset added      Notify trac about changesets added to a
repository\nchangeset modified   Notify trac about changesets modified in a
repository\ncomponent add        Add a new component\ncomponent chown
 Change component ownership\ncomponent list       Show available
components\ncomponent remove     Remove/uninstall a component\ncomponent
rename     Rename a component\nconfig get           Get the value of the
given option in "trac.ini"\nconfig remove        Remove the specified
option from "trac.ini"\nconfig set           Set the value for the given
option in "trac.ini"\ndeploy               Extract static resources from
Trac and all plugins\nfail                 Always fail\nhotcopy
 Make a hot backup copy of an environment\nmilestone add        Add
milestone\nmilestone completed  Set milestone complete date\nmilestone due
       Set milestone due date\nmilestone list       Show
milestones\nmilestone remove     Remove milestone\nmilestone rename
Rename milestone\npermission add       Add a new permission
rule\npermission export    Export permission rules to a file or stdout as
CSV\npermission import    Import permission rules from a file or stdin as
CSV\npermission list      List permission rules\npermission remove
 Remove a permission rule\npriority add         Add a priority value
option\npriority change      Change a priority value\npriority list
 Show possible ticket priorities\npriority order       Move a priority
value up or down in the list\npriority remove      Remove a priority
value\nrepository add       Add a source repository\nrepository alias
Create an alias for a repository\nrepository list      List source
repositories\nrepository remove    Remove a source repository\nrepository
resync    Re-synchronize trac with repositories\nrepository set       Set
an attribute of a repository\nrepository sync      Resume synchronization
of repositories\nresolution add       Add a resolution value
option\nresolution change    Change a resolution value\nresolution list
 Show possible ticket resolutions\nresolution order     Move a resolution
value up or down in the list\nresolution remove    Remove a resolution
value\nsession add          Create a session for the given sid\nsession
delete       Delete the session of the specified sid\nsession list
List the name and email for the given sids\nsession purge        Purge all
anonymous sessions older than the given age\nsession set          Set the
name or email attribute of the given sid\nseverity add         Add a
severity value option\nseverity change      Change a severity
value\nseverity list        Show possible ticket severities\nseverity order
      Move a severity value up or down in the list\nseverity remove
 Remove a severity value\nticket remove        Remove ticket\nticket_type
add      Add a ticket type\nticket_type change   Change a ticket
type\nticket_type list     Show possible ticket types\nticket_type order
 Move a ticket type up or down in the list\nticket_type remove   Remove a
ticket type\nupgrade              Upgrade database to current
version\nversion add          Add version\nversion list         Show
versions\nversion remove       Remove version\nversion rename       Rename
version\nversion time         Set version date\nwiki dump            Export
wiki pages to files named by title\nwiki export          Export wiki page
to file or stdout\nwiki import          Import wiki page from file or
stdin\nwiki list            List wiki pages\nwiki load            Import
wiki pages from files\nwiki remove          Remove wiki page\nwiki rename
       Rename wiki page\nwiki replace         Replace the content of wiki
pages from files (DANGEROUS!)\nwiki upgrade         Upgrade default wiki
pages to current version\n'
--- expected
+++ actual
@@ -21,6 +21,7 @@
 config remove        Remove the specified option from "trac.ini"
 config set           Set the value for the given option in "trac.ini"
 deploy               Extract static resources from Trac and all plugins
+fail                 Always fail
 hotcopy              Make a hot backup copy of an environment
 milestone add        Add milestone
 milestone completed  Set milestone complete date


======================================================================
FAIL: test_product_help_ok
(multiproduct.tests.admin.console.ProductTracAdminTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/admin/console.py",
line 70, in test_product_help_ok
    self.assertEqual(0, rv)
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/trac/trac/admin/tests/console.py",
line 129, in assertEqual
    return unittest.TestCase.assertEqual(self, expected_results, output)
AssertionError: 0 != 2

======================================================================
FAIL: test_milestone_threads
(multiproduct.tests.ticket.model.ProductMilestoneTestCase)
Ensure that in threaded (e.g. mod_wsgi) situations, we get
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/Users/rjollos/Documents/Workspace/trac-dev/bloodhound/bloodhound-trunk/bloodhound_multiproduct/multiproduct/tests/ticket/model.py",
line 218, in test_milestone_threads
    self.assertEqual(r['from_t'], r['from_db'])
AssertionError: Items in the second set but not the first:
u'milestone_from_Thread-3'

----------------------------------------------------------------------
Ran 1288 tests in 642.382s

FAILED (failures=5, errors=6, skipped=22)


[EOM]

Reply via email to