Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes some of the hbase injection tests stricter #219

Merged
merged 1 commit into from
Jun 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,45 +44,59 @@ class HBaseInjectionsLaws extends CheckProperties with BaseProperties {
}

property("Int -> Array[Byte]") {
isLooseInjection[Int, Array[Byte]]
isInjection[Int, Array[Byte]]
}

property("Long -> Array[Byte]") {
isLooseInjection[Long, Array[Byte]]
isInjection[Long, Array[Byte]]
}

property("Double -> Array[Byte]") {
isLooseInjection[Double, Array[Byte]]
isInjection[Double, Array[Byte]]
}

property("Float -> Array[Byte]") {
isLooseInjection[Float, Array[Byte]]
isInjection[Float, Array[Byte]]
}

property("Boolean -> Array[Byte]") {
isLooseInjection[Boolean, Array[Byte]]
}

property("Short -> Array[Byte]") {
isLooseInjection[Short, Array[Byte]]
isInjection[Short, Array[Byte]]
}

property("String -> ImmutableBytesWritable") {
isLooseInjection[String, ImmutableBytesWritable]
}

property("Int -> ImmutableBytesWritable") {
isLooseInjection[Int, ImmutableBytesWritable]
isInjection[Int, ImmutableBytesWritable]
}

property("Long -> ImmutableBytesWritable") {
isLooseInjection[Long, ImmutableBytesWritable]
isInjection[Long, ImmutableBytesWritable]
}

// This injection will invert a ImmutableBytesWritable whose length is less
// or greater than the size of a Bytes.toDouble because it incorrectly assumes
// that you give it the correct number of bytes.
//
// i.e. If the ImmutableBytesWritable is a slice of the first byte of an
// underlying 8 byte array, this injection will use all the bytes when
// inverting.
property("Double -> ImmutableBytesWritable") {
isLooseInjection[Double, ImmutableBytesWritable]
}

// This injection will invert a ImmutableBytesWritable whose length is less
// or greater than the size of a Bytes.toFloat because it incorrectly assumes
// that you give it the correct number of bytes.
//
// i.e. If the ImmutableBytesWritable is a slice of the first byte of an
// underlying 4 byte array, this injection will use all the bytes when
// inverting.
property("Float -> ImmutableBytesWritable") {
isLooseInjection[Float, ImmutableBytesWritable]
}
Expand All @@ -92,10 +106,10 @@ class HBaseInjectionsLaws extends CheckProperties with BaseProperties {
}

property("Short -> ImmutableBytesWritable") {
isLooseInjection[Short, ImmutableBytesWritable]
isInjection[Short, ImmutableBytesWritable]
}

property("Array[Byte] -> ImmutableBytesWritable") {
isLooseInjection[Array[Byte], ImmutableBytesWritable]
isInjection[Array[Byte], ImmutableBytesWritable]
}
}