dtests and differing behavior across c* versions

2017-06-17 Thread Jason Brown
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) grepping log for errors (primarily for TLS)
b) byteman injections (primarily for streaming)


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(self):
  error = "new error"
  test_XYZ_feature(error)

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

def test_XYZ_feature(self, error):
  


Does this seem legit, or is there something better that is recommended?

WRT to the byteman changes, should I take a similar approach, where I split
out the byteman scripts for each variant, and then pass that script's file
name into an overloaded function?

Thanks!

-Jason


Re: dtests and differing behavior across c* versions

2017-06-17 Thread Jason Brown
bah! sent too soon. will finish up and resend asap

On Sat, Jun 17, 2017 at 8:20 AM, Jason Brown  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)
>
>


dtests and differing behavior across c* versions

2017-06-17 Thread Jason Brown
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)