Mercurial > hg > ThermostatQA
changeset 196:b4fc34288ffd
webstorage test fixes
Changes:
- tomcat catalina* logs are not checked for thermostat (webstorage) related info,
which is no longer there. (It is only searched for in thermostat-web-storage* log now.)
- increased timeouts in asserts in which it is expected service will fail / not fail.
(for example agent should fail without storage) Timeouts looked too short causing problems
in some tests.
author | Zdenek Zambersky <zzambers@redhat.com> |
---|---|
date | Mon, 27 Jul 2015 16:56:07 +0200 |
parents | 5aa76ad23f06 |
children | ab192bac2ed7 |
files | src/org/thermostat/qa2/framework/Assert.java src/org/thermostat/qa2/tests/AgentWebStorageTest.java |
diffstat | 2 files changed, 9 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/thermostat/qa2/framework/Assert.java Mon Jul 27 16:51:33 2015 +0200 +++ b/src/org/thermostat/qa2/framework/Assert.java Mon Jul 27 16:56:07 2015 +0200 @@ -40,8 +40,8 @@ */ public class Assert { - static final int runTimeout = 5; - static final int failTimeout = 10; + static final int runTimeout = 10; + static final int failTimeout = 30; public static void assertFailsToStartAndRun(Service service, String message) { Assert.assertFailsToStartAndRun(service, failTimeout, message);
--- a/src/org/thermostat/qa2/tests/AgentWebStorageTest.java Mon Jul 27 16:51:33 2015 +0200 +++ b/src/org/thermostat/qa2/tests/AgentWebStorageTest.java Mon Jul 27 16:56:07 2015 +0200 @@ -53,17 +53,14 @@ public class AgentWebStorageTest { public static final String[] THERM_AGENT_WITH_TOMCAT_ONLY_THERMOSTAT_LOGS = new String[]{ - "com.mongodb.MongoException.Network:", - //"com.mongodb.MongoException.Network: Read operation to server /127.0.0.1:27518 failed on database thermostat", + "WebStorageEndPoint: Initializing web service", + "WebStorageEndPoint: THERMOSTAT_HOME == " + ThermostatQAConfig.getThermostatHome("tested"), + "WARNING - MongoConnection: Failed to connect to storage", "java.net.ConnectException: Connection refused" }; public static final String[] THERM_AGENT_WITH_TOMCAT_ONLY_CATALINA_LOGS = new String[]{ - "WebStorageEndPoint: Initializing web service", - "WebStorageEndPoint: THERMOSTAT_HOME == " + ThermostatQAConfig.getThermostatHome("tested"), - "WARNING - MongoConnection: Failed to connect to storage", - "com.mongodb.MongoException.Network:", - //"com.mongodb.MongoException.Network: Read operation to server /127.0.0.1:27518 failed on database thermostat", - "java.net.ConnectException: Connection refused" + "INFO: Deploying web application directory", + "/webapps/thermostat" }; public static final String[] THERM_AGENT_WITH_WEB_STORAGE_THERMOSTAT_LOGS = new String[]{ @@ -82,16 +79,7 @@ public static final String[] THERM_AGENT_WITH_WEB_STORAGE_CATALINA_LOGS = new String[]{ "INFO: Deploying web application directory", - "/webapps/thermostat", - "WebStorageEndPoint: Initializing web service", - "WebStorageEndPoint: THERMOSTAT_HOME == " + ThermostatQAConfig.getThermostatHome("tested"), - "MongoConnection: Using plain socket for mongodb://", - "WebStorageEndPoint: (id: 0) registered non-aggreate category:" // - // "WebStorageEndPoint: (id: 0) registered non-aggreate category: vm-cpu-stats|com.redhat.thermostat.vm.cpu.common.model.VmCpuStat|{timeStamp=Key: timeStamp, agentId=Key: agentId, vmId=Key: vmId, cpuLoad=Key: cpuLoad}", - // "WebStorageEndPoint: (id: 1) registered non-aggreate category: vm-heap-info|com.redhat.thermostat.vm.heap.analysis.common.model.HeapInfo|{timeStamp=Key: timeStamp, agentId=Key: agentId, vmId=Key: vmId, heapId=Key: heapId, heapDumpId=Key: heapDumpId, histogramId=Key: histogramId}", - // "WebStorageEndPoint: (id: 2) registered non-aggreate category: vm-gc-stats|com.redhat.thermostat.vm.gc.common.model.VmGcStat|{runCount=Key: runCount, timeStamp=Key: timeStamp, agentId=Key: agentId, vmId=Key: vmId, wallTime=Key: wallTime, collectorName=Key: collectorName}", - // "WebStorageEndPoint: (id: 3) registered non-aggreate category: vm-memory-stats|com.redhat.thermostat.vm.memory.common.model.VmMemoryStat|{timeStamp=Key: timeStamp, generations=Key: generations, agentId=Key: agentId, vmId=Key: vmId}", - // "WebStorageEndPoint: (id: 4) registered non-aggreate category: numa-stat|com.redhat.thermostat.numa.common.NumaStat|{nodeStats=Key: nodeStats, timeStamp=Key: timeStamp, agentId=Key: agentId}" + "/webapps/thermostat" }; public static final String[] THERM_AGENT_BAD_LOGIN_CATALINA_LOGS = new String[]{ @@ -125,6 +113,7 @@ for (String pattern : patterns) { boolean b = CommonUtilities.findInLineList(list, pattern, false); if (!b) { + System.out.println("INFO: Content of *" + namePattern + "* logs:"); for (String s : list) { System.out.println("INFO: " + s); }