initial checkin
class: RegressionTests::ValueHolderTests
added: #test01_BlockValue
class: RegressionTests::ValueHolderTests class
"{ Package: 'stx:goodies/regression' }"
"{ NameSpace: RegressionTests }"
VMCrashTestCase subclass:#VMCrashTests
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'tests-Regression-RuntimeSystem'
!
!VMCrashTests methodsFor:'tests - GC'!
iter_java_initialize
<spawn: true>
1 to: 100 do:[:i |
Stdout nextPutLine: 'Pass ' , i printString.
Java release: JavaRelease JDK7.
Java initialize.
JavaVM initializeVM.
Java flushAllJavaResources.
Stdout nextPutLine: 'Full GC...'.
Smalltalk garbageCollect.
Stdout nextPutLine: 'Pass ' , i printString , '...OK'.
].
"Created: / 08-09-2014 / 12:33:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
test_java_initialize
"
Running `JavaVM boot` for long enough used to kill the
VM due to problems in memory managements.
This testcase runs for 10 minutes a test in separate VM
that 100 times boots and flushes the VM.
"
<spawn: false>
<timeout: 660> "11min"
| timeout deadline iterStart iterStop |
JavaRelease isNil ifTrue:[
Smalltalk loadPackage:'stx:libjava'.
self assert:(JavaRelease notNil).
].
timeout := self timeout.
deadline := OperatingSystem getMillisecondTime + ((timeout - 60"extra min to cover variance") * 1000).
iterStart := iterStop := 0.
[ OperatingSystem getMillisecondTime < (deadline - (iterStop - iterStart)) ] whileTrue:[
iterStart := OperatingSystem getMillisecondTime.
(self class selector: #iter_java_initialize) runCase.
iterStop := OperatingSystem getMillisecondTime.
].
"Created: / 08-09-2014 / 12:14:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
test_newspace_overflow
<timeout: 120> "2min"
<spawn: true>
| newSize newLimit |
newSize := ObjectMemory newSpaceSize.
newLimit := (newSize * 0.9) rounded.
"/ Allocate some garbage to fill in new space...
[ ObjectMemory newSpaceUsed < newLimit ] whileTrue:[
| a |
a := Array new: 100.
].
"/ Now, allocate some really huge object
String new: 300 * 1024 * 1024"300MB"
"Created: / 05-09-2014 / 19:44:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 16-09-2014 / 18:50:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VMCrashTests class methodsFor:'documentation'!
version
^ '$Header$'
!
version_CVS
^ '$Header$'
! !