File tree 4 files changed +40
-11
lines changed
Cassandra.IntegrationTests/Policies/Tests
4 files changed +40
-11
lines changed Original file line number Diff line number Diff line change 1
1
language : csharp
2
- sudo : false
2
+ sudo : required
3
+ dist : trusty
4
+ addons :
5
+ apt :
6
+ packages :
7
+ - gettext
8
+ - libcurl4-openssl-dev
9
+ - libicu-dev
10
+ - libssl-dev
11
+ - libunwind8
12
+ - zlib1g
3
13
branches :
4
14
except :
5
15
- 1.0
@@ -9,7 +19,12 @@ branches:
9
19
solution : src/Cassandra.sln
10
20
install :
11
21
- nuget restore src/Cassandra.sln
12
- - nuget install NUnit.Runners -Version 3.2.1 -OutputDirectory testrunner
22
+ - nuget install NUnit.Runners -Version 3.4.1 -OutputDirectory testrunner
23
+ - export DOTNET_INSTALL_DIR="$PWD/.dotnetcli"
24
+ - curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version latest --install-dir "$DOTNET_INSTALL_DIR"
25
+ - export PATH="$DOTNET_INSTALL_DIR:$PATH"
13
26
script :
14
27
- xbuild /p:Configuration=Release /v:m /p:restorepackages=false src/Cassandra.sln
15
- - mono ./testrunner/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe ./src/Cassandra.Tests/bin/Release/Cassandra.Tests.dll
28
+ - mono ./testrunner/NUnit.ConsoleRunner.3.4.1/tools/nunit3-console.exe ./src/Cassandra.Tests/bin/Release/Cassandra.Tests.dll
29
+ - dotnet restore
30
+ - dotnet test src/Cassandra.Tests -c Release -f netcoreapp1.0
Original file line number Diff line number Diff line change @@ -14,9 +14,19 @@ configuration:
14
14
environment :
15
15
NUNIT_PATH : nunit3-console
16
16
matrix :
17
- - CASSANDRA_VERSION : 3.4
18
-
19
- - CASSANDRA_VERSION : 2.2.5
17
+ - TARGET : net452
18
+ CI_TYPE : UNIT
19
+ - TARGET : netcoreapp1.0
20
+ CI_TYPE : UNIT
21
+ - TARGET : net452
22
+ CASSANDRA_VERSION : 3.4
23
+ CI_TYPE : INTEGRATION
24
+ - TARGET : netcoreapp1.0
25
+ CASSANDRA_VERSION : 3.4
26
+ CI_TYPE : INTEGRATION
27
+ - TARGET : net452
28
+ CASSANDRA_VERSION : 2.2.5
29
+ CI_TYPE : INTEGRATION
20
30
21
31
install :
22
32
- ps : .\appveyor_install.ps1
35
45
- long
36
46
- duration
37
47
48
+ test_script :
49
+ - dotnet restore
50
+ - IF "%CI_TYPE%" == "UNIT" dotnet test src\Cassandra.Tests -c Release -f %TARGET%
51
+ - IF "%CI_TYPE%" == "INTEGRATION" dotnet test src\Cassandra.IntegrationTests -c Release -f %TARGET% --where "cat=short"
52
+
38
53
on_failure :
39
54
- ps : >-
40
55
Write-Host "Build failed"
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public class LoadBalancingPolicyShortTests : TestGlobals
21
21
public void TwoSessionsConnectedToSameDcUseSeparatePolicyInstances ( )
22
22
{
23
23
var builder = Cluster . Builder ( ) ;
24
- var testCluster = TestClusterManager . CreateNew ( 1 ) ;
24
+ var testCluster = TestClusterManager . CreateNew ( ) ;
25
25
26
26
using ( var cluster1 = builder . WithConnectionString ( String . Format ( "Contact Points={0}1" , testCluster . ClusterIpPrefix ) ) . Build ( ) )
27
27
using ( var cluster2 = builder . WithConnectionString ( String . Format ( "Contact Points={0}2" , testCluster . ClusterIpPrefix ) ) . Build ( ) )
@@ -249,7 +249,6 @@ public void TokenAware_BindInt_NoHops()
249
249
var pstmt = session . Prepare ( "INSERT INTO " + policyTestTools . TableName + " (k, i) VALUES (?, ?)" ) ;
250
250
for ( var i = ( int ) short . MinValue ; i < short . MinValue + 40 ; i ++ )
251
251
{
252
- var partitionKey = BitConverter . GetBytes ( i ) . Reverse ( ) . ToArray ( ) ;
253
252
var statement = pstmt
254
253
. Bind ( i , i )
255
254
. EnableTracing ( ) ;
Original file line number Diff line number Diff line change @@ -91,9 +91,9 @@ public void WithCredentials()
91
91
public void AddContactPointsThrowsWhenNameCouldNotBeResolved ( )
92
92
{
93
93
const string hostName = "not_existent_host_100003030" ;
94
- var ex = Assert . Throws < SocketException > ( ( ) => Cluster . Builder ( )
95
- . AddContactPoint ( hostName )
96
- . Build ( ) ) ;
94
+ var ex = ( SocketException ) Assert . Throws (
95
+ Is . InstanceOf < SocketException > ( ) ,
96
+ ( ) => Cluster . Builder ( ) . AddContactPoint ( hostName ) . Build ( ) ) ;
97
97
Assert . AreEqual ( ex . SocketErrorCode , SocketError . HostNotFound ) ;
98
98
}
99
99
You can’t perform that action at this time.
0 commit comments