[jboss-svn-commits] JBL Code SVN: r32993 - in labs/jbossrules/trunk: drools-compiler/src/test/java/org/drools/integrationtests and 4 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri May 21 03:42:49 EDT 2010
Author: mark.proctor at jboss.com
Date: 2010-05-21 03:42:48 -0400 (Fri, 21 May 2010)
New Revision: 32993
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/Person.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentHashTable.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentRightTupleList.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleIndexHashTable.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleList.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ExistsNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/NotNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RightTupleMemory.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/JoinNodeTest.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/ConcurrentRightTupleIndexHashTableTest.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleIndexHashTableTest.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleListTest.java
Log:
JBRULES-2240 True modify
-Another self join issue, with not nodes. Added a fix to hack index bucket lookups, to avoid mutating self joins. Added failing test to catch regression
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/Person.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/Person.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/Person.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -183,7 +183,7 @@
}
public String toString() {
- return "[Person name='" + this.name + "']";
+ return "[Person name='" + this.name + " age='" + this.age + "' likes='" + likes + "']";
}
/**
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -4716,6 +4716,7 @@
results.size() );
}
+
public void testSelfJoinWithIndex() {
String drl = "";
drl += "package org.test\n";
@@ -4760,7 +4761,7 @@
ksession.fireAllRules();
assertEquals( 0, list.size() );
- }
+ }
public void testMergingDifferentPackages() throws Exception {
// using the same builder
@@ -4786,6 +4787,69 @@
}
}
+ public void testSelfJoinAndNotWithIndex() {
+ String drl = "";
+ drl += "package org.test\n";
+ drl += "import org.drools.Person\n";
+ drl += "global java.util.List list\n";
+ drl += "rule test1\n";
+ drl += "when\n";
+ drl += " $p1 : Person( )\n";
+ drl += " not Person( name == $p1.name, age < $p1.age )\n";
+ drl += " $p2 : Person( name == $p1.name, likes != $p1.likes, age > $p1.age)\n";
+ drl += " not Person( name == $p1.name, likes == $p2.likes, age < $p2.age )\n";
+ drl += "then\n";
+ drl += " System.out.println( $p1 + \":\" + $p2 );\n";
+ drl += " list.add( $p1 );\n";
+ drl += " list.add( $p2 );\n";
+ drl += "end\n";
+
+ KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
+ kbuilder.add( ResourceFactory.newReaderResource( new StringReader( drl ) ),
+ ResourceType.DRL );
+ KnowledgeBuilderErrors errors = kbuilder.getErrors();
+ if ( kbuilder.hasErrors() ) {
+ fail( kbuilder.getErrors().toString() );
+ }
+ assertFalse( kbuilder.hasErrors() );
+
+ KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
+ kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
+ StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
+
+ List list = new ArrayList();
+ ksession.setGlobal( "list", list );
+
+ Person p0 = new Person("yoda", 0);
+ p0.setLikes( "cheddar" );
+ org.drools.runtime.rule.FactHandle fh0 = ksession.insert( p0 );
+
+ Person p1 = new Person("darth", 15);
+ p1.setLikes( "cheddar" );
+ org.drools.runtime.rule.FactHandle fh1 = ksession.insert( p1 );
+
+ Person p2 = new Person("darth", 25);
+ p2.setLikes( "cheddar" );
+ org.drools.runtime.rule.FactHandle fh2 = ksession.insert( p2 ); // creates activation.
+
+ Person p3 = new Person("darth", 30);
+ p3.setLikes( "brie" );
+ org.drools.runtime.rule.FactHandle fh3 = ksession.insert( p3 );
+
+ ksession.fireAllRules();
+ assertEquals( 2, list.size() );
+ assertSame( p1, list.get( 0 ) );
+ assertSame( p3, list.get( 1 ) );
+
+ p1.setName( "yoda" );
+ ksession.update( fh1, p1 ); // creates activation
+
+ ksession.fireAllRules();
+ assertEquals( 4, list.size() );
+ assertSame( p2, list.get( 2 ) );
+ assertSame( p3, list.get( 3 ) );
+ }
+
public void testMergingDifferentPackages2() throws Exception {
// using different builders
try {
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentHashTable.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentHashTable.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentHashTable.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -22,6 +22,7 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.locks.ReentrantLock;
+import org.drools.common.InternalFactHandle;
import org.drools.core.util.AbstractHashTable.DoubleCompositeIndex;
import org.drools.core.util.AbstractHashTable.FieldIndex;
import org.drools.core.util.AbstractHashTable.Index;
@@ -334,7 +335,8 @@
}
RightTupleList get(final int hashCode,
- final LeftTuple tuple) {
+ final LeftTuple tuple,
+ final InternalFactHandle factHandle) {
//this.index.setCachedValue( tuple );
lock();
try {
@@ -345,7 +347,8 @@
while ( entry != null ) {
if ( entry.matches( tuple,
- hashCode ) ) {
+ hashCode ,
+ factHandle ) ) {
return entry;
}
entry = (RightTupleList) entry.getNext();
@@ -692,10 +695,11 @@
object );
}
- public RightTupleList get(final LeftTuple tuple) {
+ public RightTupleList get(final LeftTuple tuple, InternalFactHandle factHandle) {
final int hashCode = this.index.hashCodeOf( tuple );
return segmentFor( hashCode ).get( hashCode,
- tuple );
+ tuple,
+ factHandle);
}
/**
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentRightTupleList.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentRightTupleList.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/ConcurrentRightTupleList.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -44,7 +44,7 @@
this.hashCode = hashCode;
}
- public RightTuple getFirst(LeftTuple leftTuple) {
+ public RightTuple getFirst(LeftTuple leftTuple, InternalFactHandle factHandle ) {
return this.first.get();
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleIndexHashTable.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleIndexHashTable.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleIndexHashTable.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -7,6 +7,7 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import org.drools.common.InternalFactHandle;
import org.drools.reteoo.LeftTuple;
import org.drools.reteoo.RightTuple;
import org.drools.reteoo.RightTupleMemory;
@@ -83,8 +84,8 @@
out.writeObject( index );
}
- public RightTuple getFirst(LeftTuple leftTuple) {
- RightTupleList bucket = get( leftTuple );
+ public RightTuple getFirst(LeftTuple leftTuple, InternalFactHandle factHandle) {
+ RightTupleList bucket = get( leftTuple, factHandle );
if ( bucket != null ) {
return bucket.first;
} else {
@@ -307,18 +308,20 @@
return false;
}
- public RightTupleList get(final LeftTuple tuple) {
+ public RightTupleList get(final LeftTuple tuple, InternalFactHandle factHandle) {
//this.index.setCachedValue( tuple );
final int hashCode = this.index.hashCodeOf( tuple );
final int index = indexOf( hashCode,
this.table.length );
+
RightTupleList entry = (RightTupleList) this.table[index];
while ( entry != null ) {
if ( entry.matches( tuple,
- hashCode ) ) {
+ hashCode,
+ factHandle ) ) {
return entry;
}
entry = (RightTupleList) entry.getNext();
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleList.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleList.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/core/util/RightTupleList.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -54,7 +54,7 @@
this.last = p.last;
}
- public RightTuple getFirst(LeftTuple leftTuple) {
+ public RightTuple getFirst(LeftTuple leftTuple, InternalFactHandle factHandle) {
return this.first;
}
@@ -186,8 +186,21 @@
}
public boolean matches(final LeftTuple tuple,
- final int tupleHashCode) {
- return this.hashCode == tupleHashCode && this.index.equal( this.first.getFactHandle().getObject(),
+ final int tupleHashCode,
+ final InternalFactHandle factHandle) {
+ if ( this.hashCode != tupleHashCode ) {
+ return false;
+ }
+
+ if ( this.first.getFactHandle() == factHandle ) {
+ RightTuple rightTuple = ( RightTuple ) this.first.getNext();
+ if ( rightTuple != null ) {
+ return this.index.equal( rightTuple.getFactHandle().getObject(),
+ tuple );
+ }
+ }
+
+ return this.index.equal( this.first.getFactHandle().getObject(),
tuple );
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -159,7 +159,7 @@
workingMemory,
leftTuple );
- for ( RightTuple rightTuple = memory.betaMemory.getRightTupleMemory().getFirst( leftTuple ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
+ for ( RightTuple rightTuple = memory.betaMemory.getRightTupleMemory().getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
InternalFactHandle handle = rightTuple.getFactHandle();
if ( this.constraints.isAllowedCachedLeft( memory.betaMemory.getContext(),
handle ) ) {
@@ -332,7 +332,7 @@
RightTupleMemory rightMemory = memory.betaMemory.getRightTupleMemory();
- RightTuple rightTuple = rightMemory.getFirst( leftTuple );
+ RightTuple rightTuple = rightMemory.getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() );
// first check our index (for indexed nodes only) hasn't changed and we are returning the same bucket
if ( childLeftTuple != null && rightMemory.isIndexed() && rightTuple != rightMemory.getFirst( childLeftTuple.getRightParent() ) ) {
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ExistsNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ExistsNode.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ExistsNode.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -112,7 +112,7 @@
}
}
- for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
+ for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
if ( this.constraints.isAllowedCachedLeft( memory.getContext(),
rightTuple.getFactHandle() ) ) {
@@ -304,7 +304,7 @@
memory.getLeftTupleMemory().remove( leftTuple );
} else {
// check if we changed bucket
- if ( rightMemory.isIndexed() && rightMemory.getFirst( blocker ) != rightMemory.getFirst( leftTuple ) ) {
+ if ( rightMemory.isIndexed() && rightMemory.getFirst( blocker ) != rightMemory.getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() ) ) {
// we changed bucket, so blocker no longer blocks
blocker.removeBlocked( leftTuple );
leftTuple.setBlocker( null );
@@ -332,7 +332,7 @@
}
// find first blocker, because it's a modify, we need to start from the beginning again
- RightTuple rightTuple = rightMemory.getFirst( leftTuple );
+ RightTuple rightTuple = rightMemory.getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() );
for ( RightTuple newBlocker = rightTuple; newBlocker != null; newBlocker = (RightTuple) newBlocker.getNext() ) {
if ( this.constraints.isAllowedCachedLeft( memory.getContext(),
newBlocker.getFactHandle() ) ) {
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/JoinNode.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -77,7 +77,7 @@
this.constraints.updateFromTuple( memory.getContext(),
workingMemory,
leftTuple );
- for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
+ for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
final InternalFactHandle handle = rightTuple.getFactHandle();
if ( this.constraints.isAllowedCachedLeft( memory.getContext(),
handle ) ) {
@@ -281,7 +281,7 @@
RightTupleMemory rightMemory = memory.getRightTupleMemory();
- RightTuple rightTuple = rightMemory.getFirst( leftTuple );
+ RightTuple rightTuple = rightMemory.getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() );
// first check our index (for indexed nodes only) hasn't changed and we are returning the same bucket
if ( childLeftTuple != null && rightMemory.isIndexed() && ( rightTuple == null || ( rightTuple.getMemory() != childLeftTuple.getRightParent().getMemory() ) ) ) {
@@ -365,7 +365,7 @@
this.constraints.updateFromTuple( memory.getContext(),
workingMemory,
leftTuple );
- for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
+ for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
if ( this.constraints.isAllowedCachedLeft( memory.getContext(),
rightTuple.getFactHandle() ) ) {
sink.assertLeftTuple( new LeftTuple( leftTuple,
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/NotNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/NotNode.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/NotNode.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -77,7 +77,7 @@
workingMemory,
leftTuple );
- for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
+ for ( RightTuple rightTuple = memory.getRightTupleMemory().getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() ); rightTuple != null; rightTuple = (RightTuple) rightTuple.getNext() ) {
if ( this.constraints.isAllowedCachedLeft( memory.getContext(),
rightTuple.getFactHandle() ) ) {
leftTuple.setBlocker( rightTuple );
@@ -245,7 +245,7 @@
memory.getLeftTupleMemory().remove( leftTuple );
} else {
// check if we changed bucket
- if ( rightMemory.isIndexed() && rightMemory.getFirst( blocker ) != rightMemory.getFirst( leftTuple ) ) {
+ if ( rightMemory.isIndexed() && rightMemory.getFirst( blocker ) != rightMemory.getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() ) ) {
// we changed bucket, so blocker no longer blocks
blocker.removeBlocked( leftTuple );
leftTuple.setBlocker( null );
@@ -273,7 +273,7 @@
}
// find first blocker, because it's a modify, we need to start from the beginning again
- RightTuple rightTuple = rightMemory.getFirst( leftTuple );
+ RightTuple rightTuple = rightMemory.getFirst( leftTuple, (InternalFactHandle) context.getFactHandle() );
for ( RightTuple newBlocker = rightTuple; newBlocker != null; newBlocker = (RightTuple) newBlocker.getNext() ) {
if ( this.constraints.isAllowedCachedLeft( memory.getContext(),
newBlocker.getFactHandle() ) ) {
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RightTupleMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RightTupleMemory.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RightTupleMemory.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -1,10 +1,11 @@
package org.drools.reteoo;
+import org.drools.common.InternalFactHandle;
import org.drools.core.util.Entry;
import org.drools.core.util.Iterator;
public interface RightTupleMemory {
- public RightTuple getFirst(LeftTuple leftTuple);
+ public RightTuple getFirst(LeftTuple leftTuple, InternalFactHandle factHandle);
public RightTuple getFirst(RightTuple rightTuple);
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/JoinNodeTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/JoinNodeTest.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/JoinNodeTest.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -260,7 +260,7 @@
assertEquals(2, this.memory.getRightTupleMemory().size());
RightTuple rightTuple = this.memory.getRightTupleMemory().getFirst(
- new LeftTuple(f0, this.node, true));
+ new LeftTuple(f0, this.node, true), null);
final InternalFactHandle rf0 = rightTuple.getFactHandle();
final InternalFactHandle rf1 = ((RightTuple) rightTuple.getNext())
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/ConcurrentRightTupleIndexHashTableTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/ConcurrentRightTupleIndexHashTableTest.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/ConcurrentRightTupleIndexHashTableTest.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -65,7 +65,7 @@
map.size() );
assertNull( map.get( new LeftTuple( cheddarHandle1,
null,
- true ) ) );
+ true ),cheddarHandle1 ) );
final Cheese stilton1 = new Cheese( "stilton",
35 );
@@ -85,7 +85,7 @@
final RightTupleList list = map.get( new LeftTuple( stiltonHandle2,
null,
- true ) );
+ true ),stiltonHandle2 );
assertSame( stiltonRighTuple.getFactHandle(),
list.first.getFactHandle() );
assertNull( list.first.getNext() );
@@ -136,7 +136,7 @@
stilton2 );
RightTupleList list = map.get( new LeftTuple( stiltonHandle2,
null,
- true ) );
+ true ), stiltonHandle2 );
assertSame( stiltonHandle1,
list.first.getFactHandle() );
assertNull( list.first.getNext() );
@@ -147,7 +147,8 @@
cheddar2 );
list = map.get( new LeftTuple( cheddarHandle2,
null,
- true ) );
+ true ),
+ cheddarHandle2 );
assertSame( cheddarHandle1,
list.first.getFactHandle() );
assertNull( list.first.getNext() );
@@ -207,7 +208,7 @@
final RightTupleList list = map.get( new LeftTuple( stiltonHandle3,
null,
- true ) );
+ true ), stiltonHandle3 );
assertSame( stiltonHandle1,
list.first.getFactHandle() );
assertSame( stiltonHandle2,
@@ -599,7 +600,7 @@
assertNull( map.getFirst( new LeftTuple( stiltonHandle,
null,
- true ) ) );
+ true ), null ) );
}
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleIndexHashTableTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleIndexHashTableTest.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleIndexHashTableTest.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -64,7 +64,7 @@
map.size() );
assertNull( map.get( new LeftTuple( cheddarHandle1,
null,
- true ) ) );
+ true ), cheddarHandle1 ) );
final Cheese stilton1 = new Cheese( "stilton",
35 );
@@ -86,7 +86,7 @@
final RightTupleList list = map.get( new LeftTuple( stiltonHandle2,
null,
- true ) );
+ true ), stiltonHandle2 );
assertSame( stiltonRighTuple.getFactHandle(),
list.first.getFactHandle() );
assertNull( list.first.getNext() );
@@ -139,7 +139,7 @@
stilton2 );
RightTupleList list = map.get( new LeftTuple( stiltonHandle2,
null,
- true ) );
+ true ),stiltonHandle2 );
assertSame( stiltonHandle1,
list.first.getFactHandle() );
assertNull( list.first.getNext() );
@@ -150,7 +150,7 @@
cheddar2 );
list = map.get( new LeftTuple( cheddarHandle2,
null,
- true ) );
+ true ), cheddarHandle2 );
assertSame( cheddarHandle1,
list.first.getFactHandle() );
assertNull( list.first.getNext() );
@@ -212,7 +212,7 @@
final RightTupleList list = map.get( new LeftTuple( stiltonHandle3,
null,
- true ) );
+ true ), stiltonHandle3 );
assertSame( stiltonHandle1,
list.first.getFactHandle() );
assertSame( stiltonHandle2,
@@ -607,7 +607,7 @@
assertNull( map.getFirst( new LeftTuple( stiltonHandle,
null,
- true ) ) );
+ true ), stiltonHandle ) );
}
}
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleListTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleListTest.java 2010-05-21 05:55:43 UTC (rev 32992)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/util/RightTupleListTest.java 2010-05-21 07:42:48 UTC (rev 32993)
@@ -17,6 +17,6 @@
stilton1 );
assertNull( map.getFirst( new LeftTuple( h1, null,
- true ) ) );
+ true ), null ) );
}
}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list