Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-torres committed Jan 17, 2018
1 parent da13f37 commit a9d6b82
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class StreamingDataSourceV2Suite extends StreamTest {
query.stop()
}

private def testUnsupportedOperationCase(
private def testNegativeCase(
readFormat: String,
writeFormat: String,
trigger: Trigger,
Expand All @@ -164,7 +164,7 @@ class StreamingDataSourceV2Suite extends StreamTest {
assert(ex.getMessage.contains(errorMsg))
}

private def testLogicalPlanCase(
private def testLogicalPlanNegativeCase(
readFormat: String,
writeFormat: String,
trigger: Trigger,
Expand Down Expand Up @@ -211,37 +211,37 @@ class StreamingDataSourceV2Suite extends StreamTest {
case (r, _, _)
if !r.isInstanceOf[MicroBatchReadSupport]
&& !r.isInstanceOf[ContinuousReadSupport] =>
testUnsupportedOperationCase(read, write, trigger,
testNegativeCase(read, write, trigger,
s"Data source $read does not support streamed reading")

// Invalid - trigger is continuous but writer is not
case (_, w, _: ContinuousTrigger) if !w.isInstanceOf[ContinuousWriteSupport] =>
testUnsupportedOperationCase(read, write, trigger,
testNegativeCase(read, write, trigger,
s"Data source $write does not support continuous writing")

// Invalid - can't write at all
case (_, w, _)
if !w.isInstanceOf[MicroBatchWriteSupport]
&& !w.isInstanceOf[ContinuousWriteSupport] =>
testUnsupportedOperationCase(read, write, trigger,
testNegativeCase(read, write, trigger,
s"Data source $write does not support streamed writing")

// Invalid - trigger and writer are continuous but reader is not
case (r, _: ContinuousWriteSupport, _: ContinuousTrigger)
if !r.isInstanceOf[ContinuousReadSupport] =>
testLogicalPlanCase(read, write, trigger,
testLogicalPlanNegativeCase(read, write, trigger,
s"Data source $read does not support continuous processing")

// Invalid - trigger is microbatch but writer is not
case (_, w, t)
if !w.isInstanceOf[MicroBatchWriteSupport] && !t.isInstanceOf[ContinuousTrigger] =>
testUnsupportedOperationCase(read, write, trigger,
testNegativeCase(read, write, trigger,
s"Data source $write does not support streamed writing")

// Invalid - trigger and writer are microbatch but reader is not
case (r, _, t)
if !r.isInstanceOf[MicroBatchReadSupport] && !t.isInstanceOf[ContinuousTrigger] =>
testLogicalPlanCase(read, write, trigger,
testLogicalPlanNegativeCase(read, write, trigger,
s"Data source $read does not support microbatch processing")
}
}
Expand Down

0 comments on commit a9d6b82

Please sign in to comment.