Skip to content

Commit 984b31d

Browse files
committed
Merge branch '2.0' into 2.1
2 parents 3ffa863 + 3f1d5b2 commit 984b31d

13 files changed

Lines changed: 467 additions & 561 deletions

File tree

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
Contributing guidelines
2-
=======================
1+
# Contributing guidelines
32

4-
Working on an issue
5-
-------------------
3+
## Working on an issue
64

75
Before starting to work on something, please comment in JIRA or ask on the mailing list
86
to make sure nobody else is working on it.
@@ -13,44 +11,41 @@ get merged in 2.1.
1311
Before you send your pull request, make sure that:
1412

1513
- you have a unit test that failed before the fix and succeeds after.
16-
- the fix is mentioned in ``driver-core/CHANGELOG.rst``.
14+
- the fix is mentioned in `driver-core/CHANGELOG.rst`.
1715
- the commit message include the reference of the JIRA ticket for automatic linking
18-
(example: ``Fix NPE when a connection fails during pool construction (JAVA-503).``).
16+
(example: `Fix NPE when a connection fails during pool construction (JAVA-503).`).
1917

2018
As long as your pull request is not merged, it's OK to rebase your branch and push with
21-
``--force``.
19+
`--force`.
2220

23-
If you want to contribute but don't have a specific issue in mind, the `lhf <https://datastax-oss.atlassian.net/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project%20%3D%20JAVA%20AND%20status%20in%20(Open%2C%20Reopened)%20AND%20labels%20%3D%20lhf>`_
21+
If you want to contribute but don't have a specific issue in mind, the [lhf](https://datastax-oss.atlassian.net/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project%20%3D%20JAVA%20AND%20status%20in%20(Open%2C%20Reopened)%20AND%20labels%20%3D%20lhf)
2422
label in JIRA is a good place to start: it marks "low hanging fruits" that don't require
2523
in-depth knowledge of the codebase.
2624

27-
Editor configuration
28-
--------------------
25+
## Editor configuration
2926

30-
General
31-
~~~~~~~
27+
### General
3228

3329
We consider automatic formatting as a help, not a crutch. Sometimes it makes sense to
3430
break the rules to make the code more readable, for instance aligning columns (see the
35-
constant declarations in ``DataType.Name`` for an example of this).
31+
constant declarations in `DataType.Name` for an example of this).
3632

3733
**Please do not reformat whole files, only the lines that you have added or modified**.
3834

3935

40-
Eclipse
41-
~~~~~~~
36+
### Eclipse
4237

4338
Formatter:
4439

4540
- Preferences > Java > Code Style > Formatter.
4641
- Click "Import".
47-
- Select ``src/main/config/ide/eclipse-formatter.xml``.
42+
- Select `src/main/config/ide/eclipse-formatter.xml`.
4843

4944
Import order:
5045

5146
- Preferences > Java > Code Style > Organize imports.
5247
- Click "Import".
53-
- Select ``src/main/config/ide/eclipse.importorder``.
48+
- Select `src/main/config/ide/eclipse.importorder`.
5449

5550
Prevent trailing whitespaces:
5651

@@ -63,10 +58,43 @@ Prevent trailing whitespaces:
6358
- Click "OK" (the text area should only have one action "Remove trailing white spaces").
6459

6560

66-
IntelliJ IDEA
67-
~~~~~~~~~~~~~
61+
### IntelliJ IDEA
6862

6963
- File > Import Settings...
70-
- Select ``src/main/config/ide/intellij-code-style.jar``.
64+
- Select `src/main/config/ide/intellij-code-style.jar`.
7165

7266
This should add a new Code Style scheme called "java-driver".
67+
68+
## Running the tests
69+
70+
We use TestNG. There are 3 test categories:
71+
72+
- "unit": pure Java unit tests.
73+
- "short" and "long": integration tests that launch Cassandra instances.
74+
75+
The Maven build uses profiles named after the categories to choose which tests to run:
76+
77+
```
78+
mvn test -Pshort
79+
```
80+
81+
The default is "unit". Each profile runs the ones before it ("short" runs unit, etc.)
82+
83+
Integration tests use [CCM](https://github.com/pcmanus/ccm) to bootstrap Cassandra instances.
84+
Two Maven properties control its execution:
85+
86+
- `cassandra.version`: the Cassandra version. This has a default value in the root POM,
87+
you can override it on the command line (`-Dcassandra.version=...`).
88+
- `ipprefix`: the prefix of the IP addresses that the Cassandra instances will bind to (see
89+
below). This defaults to `127.0.1.`.
90+
91+
92+
CCM launches multiple Cassandra instances on localhost by binding to different addresses. The
93+
driver uses up to 6 different instances (127.0.1.1 to 127.0.1.6 with the default prefix).
94+
You'll need to define loopback aliases for this to work, on Mac OS X your can do it with:
95+
96+
```
97+
sudo ifconfig lo0 alias 127.0.1.1 up
98+
sudo ifconfig lo0 alias 127.0.1.2 up
99+
...
100+
```

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Please refer to the README of each module for more information.
6161
- TWITTER: Follow the latest news about DataStax Drivers - [@olim7t](http://twitter.com/olim7t), [@mfiguiere](http://twitter.com/mfiguiere)
6262
- DOCS: http://www.datastax.com/documentation/developer/java-driver/2.1/index.html
6363
- API: http://www.datastax.com/drivers/java/2.1
64-
- CHANGELOG: https://github.com/datastax/java-driver/blob/2.1/driver-core/CHANGELOG.rst
64+
6565

6666
## Maven
6767

@@ -106,11 +106,8 @@ an [UnsupportedFeatureException](https://github.com/datastax/java-driver/blob/2.
106106

107107
## Upgrading from previous versions
108108

109-
If you are upgrading from the 2.0.x branch of the driver, be sure to have a look at
110-
the [upgrade guide](https://github.com/datastax/java-driver/blob/2.1/driver-core/Upgrade_guide_to_2.1.rst).
111-
112-
If you are upgrading from the 1.x branch, follow the [upgrade guide to 2.0](https://github.com/datastax/java-driver/blob/2.0/driver-core/Upgrade_guide_to_2.0.rst),
113-
and then the above document.
109+
If you are upgrading from a previous version of the driver, be sure to have a look at
110+
the [upgrade guide](/upgrade_guide/).
114111

115112

116113
### Troubleshooting

0 commit comments

Comments
 (0)