Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
initial commit of scala 2.8.0 branch into master
- Loading branch information
Showing
13 changed files
with
141 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/test/scala/com/shorrockin/cascal/TestInsertRemoveLoop.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.shorrockin.cascal | ||
|
||
import testing._ | ||
import org.junit.{Assert, Test} | ||
import com.shorrockin.cascal.utils.Utils | ||
|
||
/** | ||
* tests a looping insert remove. Stresses out the precision of | ||
* system time. | ||
*/ | ||
class TestInsertRemoveLoop extends CassandraTestPool { | ||
import com.shorrockin.cascal.utils.Conversions._ | ||
import Assert._ | ||
|
||
@Test def testInsertRemoveLoop = borrow { session => | ||
|
||
def checkLowResolution = { | ||
var onLowPrecisionSystem = false | ||
for( i <- 1L to 100L ) { | ||
session.remove("Test" \ "Standard" \ "Test") | ||
session.insert("Test" \ "Standard" \ "Test" \ (i, "hello:"+i)) | ||
if( session.get("Test" \ "Standard" \ "Test" \ i) == None ) { | ||
onLowPrecisionSystem = true | ||
} | ||
} | ||
onLowPrecisionSystem | ||
} | ||
|
||
if( checkLowResolution ) { | ||
println("You have low resolution timer on this system") | ||
Utils.COMPENSATE_FOR_LOW_PRECISION_SYSTEM_TIME = true | ||
assertFalse("setting Utils.COMPENSATE_FOR_LOW_PRECISION_SYSTEM_TIME = true did not work around the low resolution timer problems.", checkLowResolution); | ||
} else { | ||
println("You have high resolution timer on this system") | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.