You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Jason Brown <ja...@gmail.com> on 2017/06/17 15:20:06 UTC

dtests and differing behavior across c* versions

Hey all,

As I'm finalizing work on CASSANDRA-8457 and CASSANDRA-12229 (switching to
netty for internode messaging and streaming), I need to update the a
handful of existing dtests due to changes in

a) byteman injections (primarily for streaming)
b) grepping log for errors (primarily for TLS)

As we need dtests to be backward compatible with previous c* versions,
what's the recommended strategy for having the updates for the newer
versions but keeping the existing functionality for the old tests?

For the "grepping log for errors" issue, I'm thinking of something like
this (apologies for poor python and short-handing these):

@since('4.0)
def test_XYZ_feature_40_and_up()
  error = "new error"
  test_XYZ_feature(error)

@since('3.0', max_version='3.x')
def test_XYZ_feature_before_40()
  error = "old error"
  test_XYZ_feature(error)

def test_XYZ_feature(error)

Re: dtests and differing behavior across c* versions

Posted by Jason Brown <ja...@gmail.com>.
bah! sent too soon. will finish up and resend asap

On Sat, Jun 17, 2017 at 8:20 AM, Jason Brown <ja...@gmail.com> wrote:

> Hey all,
>
> As I'm finalizing work on CASSANDRA-8457 and CASSANDRA-12229 (switching to
> netty for internode messaging and streaming), I need to update the a
> handful of existing dtests due to changes in
>
> a) byteman injections (primarily for streaming)
> b) grepping log for errors (primarily for TLS)
>
> As we need dtests to be backward compatible with previous c* versions,
> what's the recommended strategy for having the updates for the newer
> versions but keeping the existing functionality for the old tests?
>
> For the "grepping log for errors" issue, I'm thinking of something like
> this (apologies for poor python and short-handing these):
>
> @since('4.0)
> def test_XYZ_feature_40_and_up()
>   error = "new error"
>   test_XYZ_feature(error)
>
> @since('3.0', max_version='3.x')
> def test_XYZ_feature_before_40()
>   error = "old error"
>   test_XYZ_feature(error)
>
> def test_XYZ_feature(error)
>
>