-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
invocation timeout fixed to respect long running operations
- Loading branch information
1 parent
985de41
commit 0d41720
Showing
12 changed files
with
277 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
Hazelcast.Test/Hazelcast.Client.Test/ClientLongRunningTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright (c) 2008-2017, Hazelcast, Inc. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using System; | ||
using Hazelcast.Core; | ||
using Hazelcast.Test; | ||
using NUnit.Framework; | ||
|
||
namespace Hazelcast.Client.Test | ||
{ | ||
[TestFixture] | ||
[Category("enterprise")] | ||
public class ClientLongRunningTest : SingleMemberBaseTest | ||
{ | ||
private static IMap<object, object> map; | ||
|
||
[SetUp] | ||
public void Init() | ||
{ | ||
map = Client.GetMap<object, object>(TestSupport.RandomString()); | ||
FillMap(); | ||
} | ||
|
||
[TearDown] | ||
public static void Destroy() | ||
{ | ||
map.Clear(); | ||
} | ||
|
||
protected override string GetServerConfig() | ||
{ | ||
return Resources.hazelcast_delay; | ||
} | ||
|
||
private void FillMap() | ||
{ | ||
for (var i = 0; i < 10; i++) | ||
{ | ||
map.Put("key" + i, "value" + i); | ||
} | ||
} | ||
|
||
[Test] | ||
public void TestLongRunning() | ||
{ | ||
var starTicks = DateTime.Now.Ticks; | ||
var collection = map.Values(Predicates.Sql("this == 'value5'")); | ||
|
||
var timeSpan = new TimeSpan(DateTime.Now.Ticks - starTicks); | ||
Assert.IsNotEmpty(collection); | ||
Assert.GreaterOrEqual(timeSpan.TotalSeconds, 300); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.8.xsd" | ||
xmlns="http://www.hazelcast.com/schema/config" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<group> | ||
<name>dev</name> | ||
<password>dev-pass</password> | ||
</group> | ||
<management-center enabled="false">http://localhost:8080/mancenter</management-center> | ||
<network> | ||
<port auto-increment="true" port-count="100">5701</port> | ||
<outbound-ports> | ||
<!-- | ||
Allowed port range when connecting to other nodes. | ||
0 or * means use system provided port. | ||
--> | ||
<ports>0</ports> | ||
</outbound-ports> | ||
<join> | ||
<multicast enabled="true"> | ||
<multicast-group>224.7.7.7</multicast-group> | ||
<multicast-port>54327</multicast-port> | ||
</multicast> | ||
<tcp-ip enabled="false"> | ||
<interface>127.0.0.1</interface> | ||
</tcp-ip> | ||
</join> | ||
<public-address>127.0.0.1</public-address> | ||
|
||
</network> | ||
<security enabled="true"> | ||
<client-permissions> | ||
<all-permissions principal="dev"/> | ||
</client-permissions> | ||
<security-interceptors> | ||
<interceptor class-name="com.hazelcast.security.DelaySecurityInterceptor"/> | ||
</security-interceptors> | ||
</security> | ||
</hazelcast> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.