Merge branch 'master' into jta
This commit is contained in:
commit
1818950d48
5 changed files with 20 additions and 4 deletions
|
|
@ -326,7 +326,7 @@ object Vector {
|
|||
@inline
|
||||
private[stm] def array(elems: AnyRef*) = {
|
||||
val back = new Array[AnyRef](elems.length)
|
||||
Array.copy(elems, 0, back, 0, back.length)
|
||||
Array.copy(elems.toArray, 0, back, 0, back.length)
|
||||
|
||||
back
|
||||
}
|
||||
|
|
|
|||
17
akka-core/src/test/scala/VectorBugTestSuite.scala
Normal file
17
akka-core/src/test/scala/VectorBugTestSuite.scala
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package se.scalablesolutions.akka.stm
|
||||
|
||||
import org.scalatest.FunSuite
|
||||
import Transaction.Global._
|
||||
|
||||
class TransactionalVectorBugTestSuite extends FunSuite {
|
||||
|
||||
test("adding more than 32 items to a Vector shouldn't blow it up") {
|
||||
atomic {
|
||||
var v1 = new Vector[Int]()
|
||||
for (i <- 0 to 31) {
|
||||
v1 = v1 + i
|
||||
}
|
||||
v1 = v1 + 32
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory
|
||||
|
|
@ -192,7 +192,7 @@ class MongoStorageSpec extends TestCase {
|
|||
assertTrue(l.map(_._1).contains("3"))
|
||||
assertTrue(l.map(_._1).contains("4"))
|
||||
|
||||
val JsString(str) = l.filter(_._1 == "2").first._2
|
||||
val JsString(str) = l.filter(_._1 == "2").head._2
|
||||
assertEquals(str, "peter")
|
||||
|
||||
// trying to fetch for a non-existent transaction will throw
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class SupervisionBeanDefinitionParserTest extends Spec with ShouldMatchers {
|
|||
val supervised = builder.getBeanDefinition.getPropertyValues.getPropertyValue("supervised").getValue.asInstanceOf[List[ActiveObjectProperties]]
|
||||
assert(supervised != null)
|
||||
expect(3) { supervised.length }
|
||||
val iterator = supervised.elements
|
||||
val iterator = supervised.iterator
|
||||
expect("foo.bar.Foo") { iterator.next.target }
|
||||
expect("foo.bar.Bar") { iterator.next.target }
|
||||
expect("foo.bar.MyPojo") { iterator.next.target }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue