Skip to content

Commit

Permalink
ISPN-1383 Nullify cached rawValue and upgrade Netty to 3.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
galderz authored and mmarkus committed Oct 13, 2011
1 parent bbbdd42 commit a454e4a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parent/pom.xml
Expand Up @@ -144,7 +144,7 @@
<version.log4j>1.2.16</version.log4j>
<version.lucene>3.4.0</version.lucene>
<version.mysql.driver>5.1.9</version.mysql.driver>
<version.netty>3.2.3.Final</version.netty>
<version.netty>3.2.4.Final</version.netty>
<version.org.jboss.naming>5.0.6.CR1</version.org.jboss.naming>
<version.resteasy>2.2.1.GA</version.resteasy>
<version.rhq.pluginAnnotations>3.0.1</version.rhq.pluginAnnotations>
Expand Down
Expand Up @@ -176,6 +176,7 @@ abstract class AbstractProtocolDecoder[K, V <: CacheValue](transport: NettyTrans
// Reset parameters to avoid leaking previous params
// into a request that has no params
params = null.asInstanceOf[SuitableParameters]
rawValue = null.asInstanceOf[Array[Byte]] // Clear reference to value
null
}

Expand Down
@@ -0,0 +1,46 @@
/*
* Copyright 2011 Red Hat, Inc. and/or its affiliates.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/

package org.infinispan.server.hotrod.stress

import java.lang.reflect.Method
import org.infinispan.test.TestingUtil.generateRandomString
import org.infinispan.server.hotrod.test.HotRodTestingUtil._
import org.infinispan.server.hotrod.HotRodSingleNodeTest
import org.infinispan.server.hotrod.OperationStatus._
import org.testng.annotations.Test

/**
* A simple test that stresses Hot Rod by storing big data and waits to allow
* the test runner to generate heap dumps for the test.
*
* @author Galder Zamarreño
* @since 5.1
*/
@Test(groups = Array("stress"), testName = "server.hotrod.stress.HotRodBigDataStressTest", enabled = false)
class HotRodBigDataStressTest extends HotRodSingleNodeTest {

def testPutBigSizeValue(m: Method) {
val value = generateRandomString(1024 * 1024).getBytes
assertStatus(client.put(k(m), 0, 0, value), Success)
while (true)
Thread.sleep(5000)
}

}
Expand Up @@ -33,7 +33,7 @@ import org.infinispan.manager.EmbeddedCacheManager
import org.infinispan.server.core.Main._
import java.util.{Properties, Arrays}
import org.infinispan.util.{TypedProperties, Util}
import org.infinispan.config.{GlobalConfiguration, Configuration}
import org.infinispan.config.Configuration

/**
* Test utils for Hot Rod tests.
Expand Down

0 comments on commit a454e4a

Please sign in to comment.