Skip to content

Conversation

@jacek-lewandowski
Copy link
Contributor

@jacek-lewandowski jacek-lewandowski commented Mar 10, 2022

  • Don't flush schema on every schema update in unit tests
  • Use unix command to delete test data
  • Shorten teardown
  • Stable processor count presented by JMX on Jenkins, CircleCI and local

patch by @jacek-lewandowski reviewed by @michaelsembwever and @josh-mckenzie for CASSANDRA-17427

@smiklosovic smiklosovic changed the title Unit test improvements CASSANDRA-17427 Unit test improvements Mar 16, 2022
@jacek-lewandowski jacek-lewandowski force-pushed the CASSANDRA-17427-trunk branch 2 times, most recently from 8969b49 to b09e3cf Compare July 19, 2022 07:32
@michaelsembwever
Copy link
Member

@jacek-lewandowski jacek-lewandowski force-pushed the CASSANDRA-17427-trunk branch 5 times, most recently from 1f56674 to fa13ab6 Compare November 22, 2022 14:22
@jacek-lewandowski jacek-lewandowski force-pushed the CASSANDRA-17427-trunk branch 3 times, most recently from 591ab5b to 7deceda Compare January 13, 2023 10:05
Copy link
Contributor

@jmckenzie-dev jmckenzie-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No really major issues on the review; looking solid.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a CassandraRelevantProperties?

Copy link
Contributor

@smiklosovic smiklosovic Jan 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josh-mckenzie great catch, yes, it definitely should be there. If we managed to have the second reviewer for CASSANDRA-17797 and we merged that work, this would fail the build :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite interesting question. This is something to be used only in tests. Perhaps something overly contrived but maybe test properties should require something like cassandra.test property to be set in order to make them get assigned with a non-default value? (I mean, set cassandra.test to unlock those properties). Perhaps something for CASSANDRA-17797 @smiklosovic

Copy link
Contributor

@smiklosovic smiklosovic Jan 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch we work on is gathering all properties, irrelevant what they are for, in one place. I understand these are just test properties but having them somewhere separately, for example, in test source, would mean that we would start to reference test class in the prod code. Right? Not good. Having test code referencing prod code where these test properties are is better.

I am not sure how to reply to your idea about cassandra.test. I think that in general it is good idea to have them with that prefix, yes. Otherwise we are not completely sure, at the first glance, if there is not any comment, what that property is actually used for / upon.

In the long run, we would like to have all test properties with such prefix (it is really messy right now) but the first task is to manage the current "chaos" with having them scattered across all the source code. As of now, nobody has a definitive answer what all properties we use ....

I think test properties with some value should be set as the very first thing in the test class? So the defaults would be overridden (if desirable) by a tester upon starting that test when this is final static. If the value of that property is meant to be changed during the test then this needs to be fixed on the code level to resolve that property dynamically as it is called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just meant to prevent setting those properties to some non-default values in production, that is, you can only override the defaults if some additional property like, -Dcassandra.test=true is set

Copy link
Contributor

@smiklosovic smiklosovic Jan 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah right ... @Mmuzaf this is an interesting point to take into account, we might deal with this later I guess.

@jmckenzie-dev
Copy link
Contributor

In general there's a lot of whitespace removal in various files; I'm not sure why we have so many files w/trailing whitespace and we don't have anything in our style guide about it that I can see (link). So is without or with the way to go?

@jacek-lewandowski
Copy link
Contributor Author

@josh-mckenzie I've applied your review comments, please have a look before I rebase and overwrite the branch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jacek-lewandowski this should be probably undeleted.

Copy link
Contributor Author

@jacek-lewandowski jacek-lewandowski Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make sure there is no such changes before committing/merging

@jacek-lewandowski jacek-lewandowski force-pushed the CASSANDRA-17427-trunk branch 2 times, most recently from ea81d88 to be40038 Compare January 26, 2023 09:20
@jacek-lewandowski jacek-lewandowski changed the title CASSANDRA-17427 Unit test improvements Improve unit tests performance (CASSANDRA-17427 --> trunk) Jan 27, 2023
@jacek-lewandowski jacek-lewandowski force-pushed the CASSANDRA-17427-trunk branch 2 times, most recently from acdecca to 045878e Compare January 31, 2023 21:54
- Don't flush schema on every schema update in unit tests
- Use unix command to delete test data
- Shorten teardown
- Stable processor count presented by JMX on Jenkins, CircleCI and local

Patch by <jacek-lewandowski>, reviewed by <michaelsembwever> and <josh-mckenzie> for CASSANDRA-17427
@smiklosovic smiklosovic closed this Feb 2, 2023
@jacek-lewandowski jacek-lewandowski deleted the CASSANDRA-17427-trunk branch March 9, 2023 07:27
blambov pushed a commit to blambov/cassandra that referenced this pull request Jan 22, 2025
Do all coordinator-side sorting for index queries in StorageAttachedIndexQueryPlan#postProcessor.
blambov pushed a commit to blambov/cassandra that referenced this pull request Feb 20, 2025
Do all coordinator-side sorting for index queries in StorageAttachedIndexQueryPlan#postProcessor.
michaelsembwever pushed a commit to thelastpickle/cassandra that referenced this pull request Jan 7, 2026
Do all coordinator-side sorting for index queries in StorageAttachedIndexQueryPlan#postProcessor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants