#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
Reporter: olemis | Owner: olemis
Type: enhancement | Status: assigned
Priority: major | Milestone: Release 6
Component: multiproduct | Version:
Resolution: | Keywords: bep-0003 product environment
---------------------------+------------------------------------------
Changes (by jure):
* status: review => assigned
* owner: jure => olemis
Comment:
After applying the patch there's a number of (additional) failures running
the test suite:
{{{
======================================================================
ERROR: test (tests.wiki.formatter.ProductWikiTestCase)
Test global: links - report link shorthand form
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/path/to/bloodhound/bloodhound_multiproduct/tests/wiki/formatter.py",
line 86, in setUp
self._env = ProductEnvironment(self.global_env, prefix)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/cache.py", line
74, in wrapper
del cache[key], refcount[key]
KeyError: (<ProductEnvironment u'tp1' at 0x10e8a4f50>, 'tp2')
======================================================================
ERROR: test (tests.wiki.formatter.ProductWikiTestCase)
Test product: links - milestone: link resolver
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/path/to/bloodhound/bloodhound_multiproduct/tests/wiki/formatter.py",
line 78, in setUp
self._load_product_from_data(self.env, prefix)
File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
219, in _load_product_from_data
product.insert()
File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/model.py",
line 159, in insert
sdata)
TracError: Product prefix='tp2' already exists {'prefix': 'tp2', 'name':
'test product 2', 'owner': None, 'description': 'desc for tp2'}
======================================================================
ERROR: test (tests.wiki.formatter.ProductWikiTestCase)
Test global: links - escaping the above
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/path/to/bloodhound/bloodhound_multiproduct/tests/wiki/formatter.py",
line 69, in setUp
formatter.WikiTestCase.setUp(self)
File "/path/to/bloodhound/trac/trac/wiki/tests/formatter.py", line 169,
in setUp
wiki.save('joe', 'Entry page', '::1', datetime.now(utc))
File "/path/to/bloodhound/trac/trac/wiki/model.py", line 144, in save
self.readonly))
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 118, in execute
return self.connection.execute(query, params=params)
File "/path/to/bloodhound/trac/trac/db/util.py", line 121, in execute
cursor.execute(query, params)
File
"/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
line 83, in execute
return super(BloodhoundIterableCursor,
self).execute(translate_sql(self.env, sql), args=args)
File "/path/to/bloodhound/trac/trac/db/util.py", line 54, in execute
r = self.cursor.execute(sql_escape_percent(sql), args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 78, in
execute
result = PyFormatCursor.execute(self, *args)
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 56, in
execute
args or [])
File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
_rollback_on_error
return function(self, *args, **kwargs)
IntegrityError: columns name, version, product are not unique
}}}
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/440#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker