Mmuzaf commented on code in PR #2046:
URL: https://github.com/apache/cassandra/pull/2046#discussion_r1164508567
##########
test/unit/org/apache/cassandra/config/DatabaseDescriptorTest.java:
##########
@@ -233,11 +235,9 @@ public void testInvalidPartition() throws Exception
@Test
public void testInvalidPartitionPropertyOverride() throws Exception
{
- String key = Config.PROPERTY_PREFIX + "partitioner";
- String previous = System.getProperty(key);
+ String previous =
CassandraRelevantProperties.PARTITIONER.setString("ThisDoesNotExist");
Review Comment:
I would say this is a good remark. There are a few options to solve this in
an elegant way that should be carefully considered:
- use `WithProperties` class
- introduce a new annotation `@WithProperties(name='', value='') to mark a
test method;
- use an external framework to facilitate using system properties and remove
boilerplate code from the sources;
We should also carefully check all the sources that require such a change. I
don't refuse to make this change, but I doubt we should do all refactoring
related to the system properties in this PR and it is better to move some of
the changes to new issues.
Should we file a new issue once we'll finish with these changes?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]