Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-482
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CAY-482
Summary: there can be only 254 ids created *within the same millisecond
Type: Bug
Status: Unassigned
Priority: Critical
Project: Cayenne
Components:
Cayenne Core Library
Versions:
1.2 [DEV]
Assignee:
Reporter: Tomas Jucius
Created: Wed, 15 Mar 2006 10:41 AM
Updated: Wed, 15 Mar 2006 10:41 AM
Description:
Good catch! I found what the problem is - there can be only 254 ids
created *within the same millisecond*. The test below fails with a
message "Failed on 254":
public void testIdPool() throws Exception {
Set idSet = new HashSet();
for (int i = 0; i < Integer.MAX_VALUE; i++) {
assertTrue("Failed on " + i, idSet.add(new ObjectId
("Artist")));
}
}
While a slightly modified test succeeds (ok I only waited till 100000
ids and canceled the test)
public void testIdPool() throws Exception {
Set idSet = new HashSet();
for (int i = 0; i < Integer.MAX_VALUE; i++) {
Thread.sleep(1);
assertTrue("Failed on " + i, idSet.add(new ObjectId
("Artist")));
}
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Wed Mar 15 2006 - 10:42:18 EST