forked from Terracotta-OSS/terracotta-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ Terracotta-OSS#191 : Galvan testing for single server cases
* basically move tests from sample entity (passthrough) to galvan
- Loading branch information
1 parent
5ba381f
commit 3246a02
Showing
8 changed files
with
329 additions
and
69 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
...n-tests/src/test/java/org/terracotta/management/integration/tests/AbstractSingleTest.java
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 @@ | ||
/* | ||
* Copyright Terracotta, Inc. | ||
* | ||
* 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. | ||
*/ | ||
package org.terracotta.management.integration.tests; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.terracotta.testing.rules.BasicExternalCluster; | ||
|
||
import java.io.File; | ||
|
||
import static java.util.Collections.emptyList; | ||
|
||
/** | ||
* @author Mathieu Carbou | ||
*/ | ||
public abstract class AbstractSingleTest extends AbstractTest { | ||
|
||
private final String offheapResource = "primary-server-resource"; | ||
private final String resourceConfig = | ||
"<config xmlns:ohr='http://www.terracotta.org/config/offheap-resource'>" | ||
+ "<ohr:offheap-resources>" | ||
+ "<ohr:resource name=\"" + offheapResource + "\" unit=\"MB\">64</ohr:resource>" | ||
+ "</ohr:offheap-resources>" + | ||
"</config>\n"; | ||
|
||
@Rule | ||
public org.terracotta.testing.rules.Cluster voltron = | ||
new BasicExternalCluster(new File("target/galvan"), 1, emptyList(), "", resourceConfig, ""); | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
voltron.getClusterControl().waitForActive(); | ||
commonSetUp(voltron); | ||
} | ||
|
||
@After | ||
public void tearDown() throws Exception { | ||
commonTearDown(); | ||
} | ||
|
||
} |
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
186 changes: 186 additions & 0 deletions
186
management/testing/integration-tests/src/test/resources/client-descriptors.json
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,186 @@ | ||
[ | ||
{ | ||
"name": "CacheCalls", | ||
"descriptors": [ | ||
{ | ||
"name": "clear", | ||
"returnType": "void", | ||
"parameters": [] | ||
}, | ||
{ | ||
"name": "get", | ||
"returnType": "java.lang.String", | ||
"parameters": [ | ||
{ | ||
"name": "key", | ||
"type": "java.lang.String" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "put", | ||
"returnType": "void", | ||
"parameters": [ | ||
{ | ||
"name": "key", | ||
"type": "java.lang.String" | ||
}, | ||
{ | ||
"name": "value", | ||
"type": "java.lang.String" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "size", | ||
"returnType": "int", | ||
"parameters": [] | ||
} | ||
], | ||
"capabilityContext": { | ||
"attributes": [ | ||
{ | ||
"name": "appName", | ||
"required": true | ||
}, | ||
{ | ||
"name": "cacheName", | ||
"required": true | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "CacheSettings", | ||
"descriptors": [ | ||
{ | ||
"appName": "pet-clinic", | ||
"cacheName": "pets", | ||
"size": 0 | ||
}, | ||
{ | ||
"appName": "pet-clinic", | ||
"cacheName": "clients", | ||
"size": 0 | ||
} | ||
], | ||
"capabilityContext": { | ||
"attributes": [ | ||
{ | ||
"name": "appName", | ||
"required": true | ||
}, | ||
{ | ||
"name": "cacheName", | ||
"required": true | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "CacheStatistics", | ||
"properties": { | ||
"averageWindowDuration": 1, | ||
"averageWindowUnit": "MINUTES", | ||
"historySize": 100, | ||
"historyInterval": 1, | ||
"historyIntervalUnit": "SECONDS", | ||
"timeToDisable": 5, | ||
"timeToDisableUnit": "SECONDS" | ||
}, | ||
"descriptors": [ | ||
{ | ||
"name": "Cache:ClearCount", | ||
"type": "COUNTER_HISTORY" | ||
}, | ||
{ | ||
"name": "Cache:ClearRate", | ||
"type": "RATE_HISTORY" | ||
}, | ||
{ | ||
"name": "Cache:HitCount", | ||
"type": "COUNTER_HISTORY" | ||
}, | ||
{ | ||
"name": "Cache:HitRate", | ||
"type": "RATE_HISTORY" | ||
}, | ||
{ | ||
"name": "Cache:HitRatio", | ||
"type": "RATIO_HISTORY" | ||
}, | ||
{ | ||
"name": "Cache:MissCount", | ||
"type": "COUNTER_HISTORY" | ||
}, | ||
{ | ||
"name": "Cache:MissRate", | ||
"type": "RATE_HISTORY" | ||
}, | ||
{ | ||
"name": "Cache:MissRatio", | ||
"type": "RATIO_HISTORY" | ||
}, | ||
{ | ||
"name": "ClientCache:Size", | ||
"type": "SIZE_HISTORY" | ||
} | ||
], | ||
"capabilityContext": { | ||
"attributes": [ | ||
{ | ||
"name": "appName", | ||
"required": true | ||
}, | ||
{ | ||
"name": "cacheName", | ||
"required": true | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "ManagementAgentService", | ||
"descriptors": [], | ||
"capabilityContext": { | ||
"attributes": [] | ||
} | ||
}, | ||
{ | ||
"name": "StatisticCollectorCapability", | ||
"descriptors": [ | ||
{ | ||
"name": "startStatisticCollector", | ||
"returnType": "void", | ||
"parameters": [] | ||
}, | ||
{ | ||
"name": "stopStatisticCollector", | ||
"returnType": "void", | ||
"parameters": [] | ||
}, | ||
{ | ||
"name": "updateCollectedStatistics", | ||
"returnType": "void", | ||
"parameters": [ | ||
{ | ||
"name": "capabilityName", | ||
"type": "java.lang.String" | ||
}, | ||
{ | ||
"name": "statisticNames", | ||
"type": "java.util.Collection" | ||
} | ||
] | ||
} | ||
], | ||
"capabilityContext": { | ||
"attributes": [ | ||
{ | ||
"name": "appName", | ||
"required": true | ||
} | ||
] | ||
} | ||
} | ||
] |
Oops, something went wrong.