Bug 276359 - Oracle specific test "DbChangeNotificationTest listener point to point" fails with Oracle 11.1.0.7
Summary: Oracle specific test "DbChangeNotificationTest listener point to point" fails...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: oracle
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 14:21 EDT by Edwin Tang CLA
Modified: 2022-06-09 10:28 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin Tang CLA 2009-05-14 14:21:15 EDT
Oracle specific test "DbChangeNotificationTest listener point to point" fails with Oracle 11.1.0.7. It passes with Oracle 10.2.0.4.

Stack Trace:
============
Exception Description: session[0] has invalidated 12 Employee, was not supposed to invalidate any

Local Exception Stack:
Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.1.qualifier): org.eclipse.persistence.testing.framework.TestErrorException
Exception Description: session[0] has invalidated 12 Employee, was not supposed to invalidate any
at org.eclipse.persistence.testing.tests.dbchangenotification.DbChangeNotificationTest.verifyInvalidated(DbChangeNotificationTest.java:251)
at org.eclipse.persistence.testing.tests.dbchangenotification.DbChangeNotificationTest.verify(DbChangeNotificationTest.java:222)
at org.eclipse.persistence.testing.framework.TestCase.execute(TestCase.java:155)
at org.eclipse.persistence.testing.framework.TestCase.runBare(TestCase.java:263)
at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:247)
at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208)
at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:247)
at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208)
at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
at org.eclipse.persistence.testing.framework.TestExecutor.execute(TestExecutor.java:247)
at org.eclipse.persistence.testing.framework.TestModel.execute(TestModel.java:208)
at org.eclipse.persistence.testing.framework.TestCollection.run(TestCollection.java:313)
Comment 1 Andrei Ilitchev CLA 2009-11-05 13:37:23 EST
Looks like a bug in AQ.
The problem is caused by the queue keeping sending the messages after they have been processed or rejected.

Each of the two tests from DbChangeNotuficationTestModel point to point passes when it's run first (right after the model setup);
each of the two tests fails if run second (after another test).

When the first test runs two groups of messages are caused by update in the db:
messages triggered by a row in LPROJECT table changed - those are processed by the message consumer and corresponding LargeProject objects are invalidated;
messages triggered by a row in SALARY table changed - those are not send to the message consumer (because the change is made by the same session that owns the message consumer).

When the second test runs - right after setup is done - before performing any updating of the db, the message consumer receives messages that were generated by the previous test: usually these messages are both LPROJECT and SALARY update notifications (the latter cause the test failure).

One could imagine that the LPROJECT messages (for whatever starnge reason) were kept alife in the queue (even after been delivered in the first test) and now delivered for the second time in the second test.
But delivering SALARY messages is clearly a bug, because the message consumer created by the second test specifies that it's not to recieve messages specified by the session (sessions' names are the same in both tests).

Note that this doesn't happen nether in broadcast case, nor with 10.2.0.4 version.

I don't know yet how to log a bug against Oracle AQ 11.1.0.7 - but that's the plan.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:28:14 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink