perfsonar-dev - r2094 - in trunk/functional-testing: . E2EmonMP E2EmonMP/SetupDataRequest common/echo sqlma sqlma/common sqlma/l2/MeasurmentArchiveStoreRequest sqlma/l2/MetadataKeyRequest sqlma/l2/SetupDataRequest
Subject: perfsonar development work
List archive
r2094 - in trunk/functional-testing: . E2EmonMP E2EmonMP/SetupDataRequest common/echo sqlma sqlma/common sqlma/l2/MeasurmentArchiveStoreRequest sqlma/l2/MetadataKeyRequest sqlma/l2/SetupDataRequest
Chronological Thread
- From:
- To:
- Subject: r2094 - in trunk/functional-testing: . E2EmonMP E2EmonMP/SetupDataRequest common/echo sqlma sqlma/common sqlma/l2/MeasurmentArchiveStoreRequest sqlma/l2/MetadataKeyRequest sqlma/l2/SetupDataRequest
- Date: Wed, 21 Feb 2007 02:35:39 -0500
Author: michalis
Date: 2007-02-21 02:35:37 -0500 (Wed, 21 Feb 2007)
New Revision: 2094
Added:
trunk/functional-testing/E2EmonMP/
trunk/functional-testing/E2EmonMP/SetupDataRequest/
trunk/functional-testing/E2EmonMP/SetupDataRequest/SetupDataRequests.java
trunk/functional-testing/sqlma/Test_Values.sql
trunk/functional-testing/sqlma/common/xmlDBClient.java
trunk/functional-testing/sqlma/l2/SetupDataRequest/MeasurementArchiveStoreRequests.java
Modified:
trunk/functional-testing/common/echo/EchoRequests.java
trunk/functional-testing/common/echo/EchoResponseParser.java
trunk/functional-testing/sqlma/common/MatchElements.java
trunk/functional-testing/sqlma/common/SQLClient.java
trunk/functional-testing/sqlma/common/SQLMAFunctionalTestsUtilities.java
trunk/functional-testing/sqlma/common/test.java
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreRequests.java
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreResponseParser.java
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalRequests.java
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataKeyResponseParser.java
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataResponseParser.java
Log:
Adding tests for the E2EmonMP and some enhancements
Added:
trunk/functional-testing/E2EmonMP/SetupDataRequest/SetupDataRequests.java
Property changes on:
trunk/functional-testing/E2EmonMP/SetupDataRequest/SetupDataRequests.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/functional-testing/common/echo/EchoRequests.java
===================================================================
--- trunk/functional-testing/common/echo/EchoRequests.java 2007-02-20
15:48:31 UTC (rev 2093)
+++ trunk/functional-testing/common/echo/EchoRequests.java 2007-02-21
07:35:37 UTC (rev 2094)
@@ -10,10 +10,10 @@
import org.jdom.Namespace;
import org.jdom.output.XMLOutputter;
-
-
-
/**
+ * Class for creating echo request in order to functional test the ping
+ * capabilities of perfsonar services
+ *
* @author Michalis Michael,Cynet
*
*/
@@ -28,14 +28,28 @@
protected static Namespace nmwg;
+ //
-----------------------------------------------------------------------
+ // constructors
-
+ /**
+ * Class constructor
+ */
public EchoRequests() {
nmwg = Namespace.getNamespace("nmwg",
"http://ggf.org/ns/nmwg/base/2.0/");
}
+ //
-----------------------------------------------------------------------
+ // private methods
+
+ /**
+ * Method for creating the message container
+ *
+ * @param type
+ * The value of the type attribute
+ * @return A document that is the container of the request
+ */
private Document createMessage(String type) {
Element el = new Element("message");
// Setting namespaces
@@ -46,12 +60,26 @@
return doc;
}
+ /**
+ * Method that creates an eventType element
+ *
+ * @param type
+ * The event type
+ * @return The event type element
+ */
private Element createEventType(String type) {
Element eventType = new Element("eventType", nmwg);
eventType.setText(type);
return eventType;
}
+ /**
+ * Method that creates the metadata element
+ *
+ * @param id
+ * The id attribute value
+ * @return The metadata element
+ */
private Element createMetadata(String id) {
Element metadata = new Element("metadata", nmwg);
@@ -60,6 +88,13 @@
}
+ /**
+ * Method for creating the data element
+ *
+ * @param metadataIdRef
+ * The value of the metadataIdRef attribute
+ * @return The data element
+ */
private Element createData(String metadataIdRef) {
Element data = new Element("data", nmwg);
@@ -69,6 +104,18 @@
}
+ //
-----------------------------------------------------------------------
+ // public methods
+
+ /**
+ * Method that actually creates the echo requests
+ *
+ * @param testCase
+ * The testcase number that helps define the created
request
+ * @param outputFileName
+ * The name of the file in which the request is going to be
+ * stored
+ */
public void createEchoRequests(int testCase, String outputFileName) {
// the request container document is created
@@ -113,7 +160,8 @@
doc.getRootElement().addContent(metadata);
doc.getRootElement().addContent(createData("meta"));
break;
- // A request where the metadata id ref attribute value is not
the same as
+ // A request where the metadata id ref attribute value is not
the same
+ // as
// the metadata id attribute value.
case 6:
eventType = createEventType("echo");
@@ -122,7 +170,7 @@
doc.getRootElement().addContent(metadata);
doc.getRootElement().addContent(createData("meta"));
break;
- // A request with no metadata id attribute.
+ // A request with no metadata id attribute.
case 7:
eventType = createEventType("echo");
metadata = createMetadata("meta");
@@ -131,18 +179,18 @@
doc.getRootElement().addContent(metadata);
doc.getRootElement().addContent(createData("meta"));
break;
- // A request without data.
+ // A request without data.
case 8:
eventType = createEventType("echo");
metadata = createMetadata("meta1");
metadata.addContent(eventType);
doc.getRootElement().addContent(metadata);
break;
- // A request without metadata
+ // A request without metadata
case 9:
doc.getRootElement().addContent(createData("meta"));
break;
- // A request where the type attribute has a wrong
value
+ // A request where the type attribute has a wrong value
case 10:
eventType = createEventType("echo");
metadata = createMetadata("meta");
@@ -151,7 +199,7 @@
doc.getRootElement().addContent(createData("meta"));
doc.getRootElement().setAttribute("type", "1=1");
break;
- // A request where the type attribute is empty.
+ // A request where the type attribute is empty.
case 11:
eventType = createEventType("echo");
metadata = createMetadata("meta");
@@ -160,7 +208,7 @@
doc.getRootElement().addContent(createData("meta"));
doc.getRootElement().setAttribute("type", "");
break;
- // A request with no type attribute
+ // A request with no type attribute
case 12:
eventType = createEventType("echo");
metadata = createMetadata("meta");
@@ -169,7 +217,7 @@
doc.getRootElement().addContent(createData("meta"));
doc.getRootElement().removeAttribute("type");
break;
- // A request with no metadataIdRef value.
+ // A request with no metadataIdRef value.
case 13:
eventType = createEventType("echo");
metadata = createMetadata("meta");
@@ -177,29 +225,29 @@
doc.getRootElement().addContent(metadata);
doc.getRootElement().addContent(createData(""));
break;
- // A request with no metadataIdRef
+ // A request with no metadataIdRef
case 14:
eventType = createEventType("echo");
metadata = createMetadata("meta");
metadata.addContent(eventType);
doc.getRootElement().addContent(metadata);
- Element data =createData("meta");
+ Element data = createData("meta");
data.removeAttribute("metadataIdRef");
doc.getRootElement().addContent(data);
break;
- // A request with non valid namespace
+ // A request with non valid namespace
case 15:
- nmwg=Namespace.getNamespace("nmwg",
- "http://ggf.org/ns/nmwg/base/foo/2.0/");
-
+ nmwg = Namespace.getNamespace("nmwg",
+
"http://ggf.org/ns/nmwg/base/foo/2.0/");
+
eventType = createEventType("echo");
metadata = createMetadata("meta");
metadata.addContent(eventType);
doc.getRootElement().addContent(metadata);
doc.getRootElement().addContent(createData("meta"));
- nmwg=Namespace.getNamespace("nmwg",
- "http://ggf.org/ns/nmwg/base/2.0/");
+ nmwg = Namespace.getNamespace("nmwg",
+ "http://ggf.org/ns/nmwg/base/2.0/");
break;
}
try {
@@ -217,27 +265,23 @@
}
}
+
public static void main(String[] args) {
// TODO Auto-generated method stub
if (args.length > 0) {
- System.out
- .println("Creating Echo
requests....");
+ System.out.println("Creating Echo requests....");
EchoRequests creator = new EchoRequests();
boolean f = (new File(args[0])).mkdir();
- System.out
- .print("The group of
cases is constracted(15)...");
- for (int i = 1; i< 16; i++) {
-
creator.createEchoRequests(i,args[0] + "/echo_" + i +".xml");
- }
- System.out.println("Done!");
-
+ System.out.print("Test cases are beeing
constracted(15)...");
+ for (int i = 1; i < 16; i++) {
+ creator.createEchoRequests(i, args[0] +
"/echo_" + i + ".xml");
+ }
+ System.out.println("Done!");
-
- System.out
- .println("Echo requests have been
created and stored at "
- + args[0] + "!");
+ System.out.println("Echo requests have been created
and stored at "
+ + args[0] + "!");
} else {
System.out.println("Wrong input. Needed parameter
is:");
System.out.println("[Requests Directory]");
Modified: trunk/functional-testing/common/echo/EchoResponseParser.java
===================================================================
--- trunk/functional-testing/common/echo/EchoResponseParser.java
2007-02-20 15:48:31 UTC (rev 2093)
+++ trunk/functional-testing/common/echo/EchoResponseParser.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -21,11 +21,15 @@
import org.xmldb.api.base.XMLDBException;
/**
- * @author Michalis Michael
+ * Class for parsing and validating respnses from echo requests
*
+ * @author Michalis Michael,Cynet
+ *
*/
public class EchoResponseParser {
+ //
--------------------------------------------------------------------
+ // class fields
/**
* @param args
*/
@@ -35,6 +39,19 @@
public FileWriter parserLogWriter;
+ //
-----------------------------------------------------------------------
+ // constructors
+
+ /**
+ * Class constructor
+ *
+ * @param validationLogFile
+ * The name of the file in which the validation results
are going
+ * to be stored
+ * @param parserLogFile
+ * The name of the file in which the parsing results are
going to
+ * be stored
+ */
public EchoResponseParser(String validationLogFile, String
parserLogFile) {
File validationLog = new File(validationLogFile);
File parserLog = new File(parserLogFile);
@@ -52,6 +69,9 @@
}
+ //
-----------------------------------------------------------------------
+ // private methods
+
/**
* Method that uses already defined parsing messages, for output
*
@@ -61,7 +81,7 @@
* The number of the phrase to be written in the parsing
log
*/
private void parserLogWrite(boolean pass, int phrase) {
- String success[] = { "Result code is right.\n"};
+ String success[] = { "Result code is right.\n" };
String fail[] = {
"Wrong result code\n",
@@ -137,10 +157,10 @@
+ " was successful\n" };
String fail[] = {
- "Test:" + "echo_" + testCase + "_" + " has
failed\n",
- "Test:" + "echo_" + testCase + "_"
+ "Test:" + "echo_" + testCase + " has
failed\n",
+ "Test:" + "echo_" + testCase
+ " has failed due to
validation error\n",
- "Test:" + "echo_" + testCase + "_"
+ "Test:" + "echo_" + testCase
+ " has failed because
response file doesn't exist \n" };
if (pass) {
if (phrase < success.length) {
@@ -171,7 +191,7 @@
* @param pass
* A boolean stating if its a fail or pass message.
* @param testCase
- * The numbero of the test case.
+ * The number of the test case.
* @param subTestCase
* The number of the sub test case.
* @param phrase
@@ -182,7 +202,7 @@
+ "_" + " has passed validation proccess\n" };
String fail[] = {
- "Response Message:" + "Response_ech_" +
testCase
+ "Response Message:" + "Response_echo_" +
testCase
+ " has failed validation
process\n",
"Response Message:"
+ "Response_echo_"
@@ -211,50 +231,14 @@
}
/**
- * Method used to validate the responses
+ * The most common test case
*
* @param response
- * The response xml document
- * @param testCase
- * The number of the test case
- * @param subCase
- * The number of sub test case
- * @return A boolean stating if the validation has failed or passed
+ * The response form the service
+ * @param resultCode
+ * The expected result code
+ * @return A boolean stating if the test has succedded or failed.
*/
- public boolean responseValidator(Document response) {
-
- Element rootElement = response.getRootElement();
- // basic attributes and elements of the request are recovered
- Attribute type = rootElement.getAttribute("type");
- Attribute id = rootElement.getAttribute("id");
- if ((id != null)) {
- Element metadata = rootElement.getChild("metadata",
nmwg);
- Element data = rootElement.getChild("data", nmwg);
- if ((data != null) && (metadata != null)) {
- // checking to see if the document is a
message
- if ((metadata.getAttribute("id") != null)
- &&
(data.getAttribute("metadataIdRef") != null)) {
- if
((metadata.getAttribute("id").getValue().equals(data
-
.getAttribute("metadataIdRef").getValue()))) {
- return true;
- } else {
- System.out.println("Failed
match");
- return false;
- }
- } else {
- System.out.println("Failed id");
- return false;
- }
- } else {
- System.out.println("Failed element");
- return false;
- }
- } else {
- System.out.println("Failed type");
- return false;
- }
-
- }
private boolean commonCheckCase(Document response, String resultCode)
{
Element metadata =
response.getRootElement().getChild("metadata", nmwg);
@@ -286,68 +270,154 @@
}
/**
- * @param doc
- * @param i
- * @return
+ * The method used for parsing the responses
+ *
+ * @param response
+ * The response from the service
+ * @param testCase
+ * The test case
+ * @return A boolean stating if the test has succeded or has failed.
*/
private boolean responseParser(Document response, int testCase) {
// TODO Auto-generated method stub
-
- switch(testCase){
+ // Following each test case its going to be parsed and
determine id the
+ // test has failed or if it was successful.
+
+ switch (testCase) {
+ // A case with a valid echo request. A success response is
expected.
case 1:
parserLogWrite(testCase);
- return commonCheckCase(response,"success.echo");
+ return commonCheckCase(response, "success.echo");
+ // A case with no event type. An error response is
expected.
case 2:
parserLogWrite(testCase);
- return
commonCheckCase(response,"error.common.parse_error");
+ return commonCheckCase(response,
"error.common.parse_error");
+ // A case with a wrong event type. An error resquest
is expected.
case 3:
parserLogWrite(testCase);
- return
commonCheckCase(response,"error.common.parse_error");
+ return commonCheckCase(response,
"error.common.parse_error");
+ // A case with no event type element. An error
response is expected.
case 4:
parserLogWrite(testCase);
- return
commonCheckCase(response,"error.common.parse_error");
+ return commonCheckCase(response,
"error.common.parse_error");
+ // A case with no metadata id.. An error response is
expected.
case 5:
parserLogWrite(testCase);
- return
commonCheckCase(response,"warning.common.no_metadata");
+ return commonCheckCase(response,
"warning.common.no_metadata");
+ // A case where the metadata id ref attribute value
is not the same
+ // as
+ // the metadata id attribute value. An error response
is expected.
case 6:
parserLogWrite(testCase);
- return
commonCheckCase(response,"warning.common.no_metadata");
+ return commonCheckCase(response,
"warning.common.no_metadata");
+ // A case with no metadata id attribute. An error
request is
+ // expected.
case 7:
parserLogWrite(testCase);
- return
commonCheckCase(response,"warning.common.no_metadata");
+ return commonCheckCase(response,
"warning.common.no_metadata");
+ // A case without the data element. An error response
is expected.
case 8:
parserLogWrite(testCase);
- return
commonCheckCase(response,"warning.common.no_metadata");
+ return commonCheckCase(response,
"warning.common.no_metadata");
+ // A case without metadata element. An error response
is expected.
case 9:
parserLogWrite(testCase);
- return
commonCheckCase(response,"warning.common.no_metadata");
+ return commonCheckCase(response,
"warning.common.no_metadata");
+ // A case where the type attribute has a wrong value.
An error
+ // response is expected.
case 10:
parserLogWrite(testCase);
- return
commonCheckCase(response,"error.common.action_not_supported");
+ return commonCheckCase(response,
+ "error.common.action_not_supported");
+ // A case where the type attribute is empty. An error
response is
+ // expected.
case 11:
parserLogWrite(testCase);
- return
commonCheckCase(response,"error.common.action_not_supported");
+ return commonCheckCase(response,
+ "error.common.action_not_supported");
+ // A case with no type attribute. An error response
is expected.
case 12:
parserLogWrite(testCase);
- return
commonCheckCase(response,"error.common.action_not_supported");
+ return commonCheckCase(response,
+ "error.common.action_not_supported");
+ // A case with no metadataIdRef value. An error
response is
+ // expected.
case 13:
parserLogWrite(testCase);
- return
commonCheckCase(response,"warning.common.no_metadata");
+ return commonCheckCase(response,
"warning.common.no_metadata");
+ // A case with no metadataIdRef. An error response is
expected.
case 14:
parserLogWrite(testCase);
- return
commonCheckCase(response,"warning.common.no_metadata");
+ return commonCheckCase(response,
"warning.common.no_metadata");
+ // A case with non valid namespace. An error response
is expected.
case 15:
parserLogWrite(testCase);
- return
commonCheckCase(response,"error.common.parse_error");
- default:
+ return commonCheckCase(response,
"error.common.parse_error");
+ default:
parserLogWrite(testCase);
parserLogWrite(false, 1);
return false;
}
-
+
}
- private void responseProcessor(String responseDirectory) {
+ //
-----------------------------------------------------------------------
+ // public methods
+
+ /**
+ * Method used to validate the responses
+ *
+ * @param response
+ * The response xml document
+ * @param testCase
+ * The number of the test case
+ * @param subCase
+ * The number of sub test case
+ * @return A boolean stating if the validation has failed or passed
+ */
+ public boolean responseValidator(Document response) {
+
+ Element rootElement = response.getRootElement();
+ // basic attributes and elements of the request are recovered
+ Attribute type = rootElement.getAttribute("type");
+ Attribute id = rootElement.getAttribute("id");
+ if ((id != null)) {
+ Element metadata = rootElement.getChild("metadata",
nmwg);
+ Element data = rootElement.getChild("data", nmwg);
+ if ((data != null) && (metadata != null)) {
+ // checking to see if the document is a
message
+ if ((metadata.getAttribute("id") != null)
+ &&
(data.getAttribute("metadataIdRef") != null)) {
+ if
((metadata.getAttribute("id").getValue().equals(data
+
.getAttribute("metadataIdRef").getValue()))) {
+ return true;
+ } else {
+ // System.out.println("Failed
match");
+ return false;
+ }
+ } else {
+ // System.out.println("Failed id");
+ return false;
+ }
+ } else {
+ // System.out.println("Failed element");
+ return false;
+ }
+ } else {
+ // System.out.println("Failed type");
+ return false;
+ }
+
+ }
+
+ /**
+ * Method used for validating the responses inside the response
directory
+ *
+ * @param responseDirectory
+ * The directory in which the responses from the service
are
+ * stored
+ */
+ public void responseProcessor(String responseDirectory) {
// TODO Auto-generated method stub
System.out.println("Starting validating and parsing Echo
responses...");
// Initializing dom and jdom builders
@@ -394,7 +464,7 @@
parserLogWrite(false, i, 0);
}
} else {
-
//System.out.println("Failed");
+ //
System.out.println("Failed");
validatorLogWrite(false, i, 0);
parserLogWrite(false,
i, 1);
Added: trunk/functional-testing/sqlma/Test_Values.sql
Modified: trunk/functional-testing/sqlma/common/MatchElements.java
===================================================================
--- trunk/functional-testing/sqlma/common/MatchElements.java 2007-02-20
15:48:31 UTC (rev 2093)
+++ trunk/functional-testing/sqlma/common/MatchElements.java 2007-02-21
07:35:37 UTC (rev 2094)
@@ -14,6 +14,9 @@
*/
public class MatchElements {
+ //
--------------------------------------------------------------------
+ // constructors
+
/**
* The constructor of the class
*
@@ -22,6 +25,9 @@
super();
}
+ //
--------------------------------------------------------------------
+ // public methods
+
/**
* Method for comparing attributes
*
Modified: trunk/functional-testing/sqlma/common/SQLClient.java
===================================================================
--- trunk/functional-testing/sqlma/common/SQLClient.java 2007-02-20
15:48:31 UTC (rev 2093)
+++ trunk/functional-testing/sqlma/common/SQLClient.java 2007-02-21
07:35:37 UTC (rev 2094)
@@ -50,10 +50,11 @@
System.out.print("Initializing...");
Class.forName("com.mysql.jdbc.Driver");
- con = DriverManager.getConnection(databaseAddress, database,
password);
+ con = DriverManager.getConnection("jdbc:mysql://" +
databaseAddress,
+ database, password);
System.out.println("Done");
if (!con.isClosed())
- System.out.println("Successfully connected to " +
"MySQL server!");
+ System.out.println("Successfully connected to MySQL
server!");
}
@@ -232,6 +233,46 @@
}
/**
+ * Method for executing a search query
+ *
+ * @param pathId
+ * The patId used to determine the right entry
+ * @param time
+ * The time used to determine the right entry
+ * @param table
+ * The table in which the entry is expected to be
+ * @return An array containing the queries results
+ * @throws SQLException
+ */
+ public String[] executeQuery(String pathId, String time, String table)
+ throws SQLException {
+ if (!con.isClosed()) {
+ String[] results = new String[4];
+ Statement stm = con.createStatement();
+
+ String query = "select id, status_oper, status_admin,
unix_timestamp(time) from "
+ + table
+ + " where id='"
+ + pathId
+ + "' and unix_timestamp(time)=" +
time;
+
+ ResultSet rset = stm.executeQuery(query);
+
+ while (rset.next()) {
+
+ results[0] = rset.getString(1);
+ results[1] = rset.getString(2);
+ results[2] = rset.getString(3);
+ results[3] = rset.getString(4);
+
+ }
+ return results;
+ } else {
+ return null;
+ }
+ }
+
+ /**
* Method for closing down the connection to the database.
*
* @return True if the connection is closed
@@ -247,6 +288,8 @@
}
/**
+ * A tester
+ *
* @param args
* @throws ClassNotFoundException
* @throws IllegalAccessException
@@ -254,13 +297,31 @@
* @throws SQLException
*/
public static void main(String[] args) throws InstantiationException,
- IllegalAccessException, ClassNotFoundException,
SQLException {
+ IllegalAccessException, ClassNotFoundException {
// TODO Auto-generated method stub
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- Connection c = DriverManager.getConnection(
-
"jdbc:mysql://192.168.10.86:3306/perfsonar_ma", "perfsonar_ma",
- "testpass");
+ // Class.forName("com.mysql.jdbc.Driver").newInstance();
+ // Connection c = DriverManager.getConnection(
+ // "jdbc:mysql://192.168.10.86:3306/perfsonar_ma",
"perfsonar_ma",
+ // "testpass");
+ SQLClient client;
+
+ String[] result = null;
+ try {
+ client = new
SQLClient("192.168.10.86:3306/perfsonar_ma",
+ "perfsonar_ma", "testpass");
+ result = client.executeQuery("CYNET-GEANT-Link-42",
"1170907409",
+ "interdomain_link");
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ if (result != null) {
+ System.out.println("not Null");
+ }
+ for (int i = 0; i < result.length; i++) {
+ System.out.println(result[i]);
+ }
}
}
Modified:
trunk/functional-testing/sqlma/common/SQLMAFunctionalTestsUtilities.java
===================================================================
--- trunk/functional-testing/sqlma/common/SQLMAFunctionalTestsUtilities.java
2007-02-20 15:48:31 UTC (rev 2093)
+++ trunk/functional-testing/sqlma/common/SQLMAFunctionalTestsUtilities.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -19,24 +19,28 @@
*/
public class SQLMAFunctionalTestsUtilities {
+ //
--------------------------------------------------------------------
+ // class fields
+
/**
* Declaration of namespaces and classes to be used.
*/
- protected static Namespace nmwg;
+ public static Namespace nmwg;
- protected static Namespace nmtl2;
+ public static Namespace nmtl2;
- protected static Namespace nmwgtopo3;
+ public static Namespace nmwgtopo3;
- protected static Namespace select;
+ public static Namespace select;
- private static Namespace ifevt;
+ public static Namespace ifevt;
private LinkedList links;
private Hashtable linksTable;
private MatchElements comp;
+
//
-----------------------------------------------------------------------
// constructors
@@ -101,6 +105,62 @@
// public methods
/**
+ * @param timeType
+ * @param timeValue
+ * @param stateAdmin
+ * @param stateOper
+ * @return
+ */
+ public Hashtable createDataElements(String timeType, String timeValue,
+ String stateAdmin, String stateOper) {
+ Hashtable elements = new Hashtable();
+
+ Element datum = new Element("datum", ifevt);
+ datum.setAttribute("timeType", timeType);
+ datum.setAttribute("timeValue", timeValue);
+ elements.put("datum", datum);
+
+ Element stateAd = new Element("stateAdmin", ifevt);
+ stateAd.setText(stateAdmin);
+ elements.put("stateAdmin", stateAd);
+
+ Element stateOp = new Element("stateOper", ifevt);
+ stateOp.setText(stateOper);
+ elements.put("stateOper", stateOp);
+
+ return elements;
+
+ }
+
+ /**
+ * @param id
+ * @param metadataIdRef
+ * @param elements
+ * @return
+ */
+ public Element createDataElement_Store(String id, String
metadataIdRef,
+ Hashtable elements) {
+
+ Element data = new Element("data", nmwg);
+ data.setAttribute("id", id);
+ data.setAttribute("metadataIdRef", metadataIdRef);
+
+ if (elements.get("datum") != null) {
+ Element datum = (Element) elements.get("datum");
+ if (elements.get("stateAdmin") != null) {
+ datum.addContent((Element)
elements.get("stateAdmin"));
+ }
+ if (elements.get("stateOper") != null) {
+ datum.addContent((Element)
elements.get("stateOper"));
+ }
+ data.addContent(datum);
+ }
+
+ return data;
+
+ }
+
+ /**
* This method returns the request message that will contain the
* metadata-data elements
*
@@ -126,15 +186,36 @@
}
/**
+ * @param type
+ * @return
+ */
+ public Document createNewMeasurmentArchiveStoreMessage(String type) {
+ // Creating the new document
+ Element el = new Element("message");
+ // Setting namespaces
+ el.setNamespace(nmwg);
+ el.addNamespaceDeclaration(nmtl2);
+ el.addNamespaceDeclaration(nmwgtopo3);
+ el.addNamespaceDeclaration(select);
+ el.addNamespaceDeclaration(ifevt);
+ // Setting the type attribute
+ el.setAttribute("type", type);
+ Document doc = new Document(el);
+
+ return doc;
+
+ }
+
+ /**
* Method for creating metadata elements containing a key
+ *
* @param pathId
- * The pathId of the link
+ * The pathId of the link
* @param ibatis
- * The ibatis config file
+ * The ibatis config file
* @param eventType
- * the event Type
- * @return
- * A hashtable containing the key elements
+ * the event Type
+ * @return A hashtable containing the key elements
*/
public Hashtable createKeyElements(String pathId, String ibatis,
String eventType) {
@@ -161,17 +242,18 @@
/**
* Method for creating metadata elements containing a key
+ *
* @param pathId
- * The pathId of the link
+ * The pathId of the link
* @param ibatis
- * The ibatis config file
+ * The ibatis config file
* @param eventType
- * the event Type
+ * the event Type
* @param timeSettings
- * A string array containing the time settings
+ * A string array containing the time settings
* @return
*/
-
+
public Hashtable createKeyElements(String pathId, String ibatis,
String eventType, String[] timeSettings) {
Hashtable keyElements = new Hashtable();
@@ -196,7 +278,6 @@
time.setAttribute("name", timeSettings[0]);
time.setText(timeSettings[1]);
keyElements.put("time", time);
-
} else if (timeSettings.length >= 4) {
@@ -224,7 +305,7 @@
endTime.setAttribute("name", timeSettings[2]);
endTime.setText(timeSettings[3]);
keyElements.put("endTime", endTime);
-
+
}
return keyElements;
@@ -388,6 +469,131 @@
return elementTable;
}
+
+ /**
+ * @param type
+ * @param name
+ * @param country
+ * @param city
+ * @param institution
+ * @param role
+ * @return
+ */
+ public Element createNode(String type, String name,String country,
String city, String institution,String role){
+ Element node = new Element("node",nmwgtopo3);
+
+ Element Type = new Element("type",nmwgtopo3);
+ Type.setText(type);
+
+ Element Name = new Element("name",nmwgtopo3);
+ Name.setAttribute("type", "logical");
+ Name.setText(name);
+
+ Element Country = new Element("country",nmwgtopo3);
+ Country.setText(country);
+
+ Element City = new Element("city",nmwgtopo3);
+ City.setText(city);
+
+ Element Institution = new Element("institution",nmwgtopo3);
+ Institution.setText(institution);
+
+ Element Role = new Element("role",nmwgtopo3);
+ Role.setText(role);
+
+ node.addContent(Type);
+ node.addContent(Name);
+ node.addContent(Country);
+ node.addContent(City);
+ node.addContent(Institution);
+ node.addContent(Role);
+
+ return node;
+ }
+
+ /**
+ * @param pathIdAttr
+ * @param pathId
+ * @param ibatisAttr
+ * @param ibatisConfig
+ * @return
+ */
+ public Element createParameters( String pathIdAttr, String pathId,
String ibatisAttr, String ibatisConfig ){
+
+ Element parameters = new Element("parameters",nmwg);
+
+ Element param1 = new Element("parameter",nmwg);
+ param1.setAttribute("name", pathIdAttr);
+ param1.setText(pathId);
+
+
+ Element param2 = new Element("parameter",nmwg);
+ param2.setAttribute("name", ibatisAttr);
+ param2.setText(ibatisConfig);
+
+ parameters.addContent(param1);
+ parameters.addContent(param2);
+
+ return parameters;
+
+ }
+
+ /**
+ * @param id
+ * @param name
+ * @param globalName
+ * @param type
+ * @param eventType
+ * @param node1
+ * @param node2
+ * @param parameters
+ * @return
+ */
+ public Element createMetadata_NewLink(String id, String name, String
globalName, String type, String eventType, Element node1, Element node2,
Element parameters){
+
+ Element metadata = new Element("metadata",nmwg);
+ metadata.setAttribute("id",id);
+
+ Element subject = new Element("subject",nmwg);
+
+ Element link = new Element("link",nmtl2);
+
+ Element Name = new Element("name",nmtl2);
+ Name.setAttribute("type","logical");
+ Name.setText(name);
+
+ Element GlobalName = new Element("globalName",nmtl2);
+ GlobalName.setAttribute("type","logical");
+ GlobalName.setText(globalName);
+
+ Element Type = new Element("type",nmtl2);
+ Type.setText(type);
+
+ link.addContent(Name);
+ link.addContent(GlobalName);
+ link.addContent(Type);
+ if(node1!=null){
+ link.addContent(node1);
+ }
+ if(node2!=null){
+ link.addContent(node2);
+ }
+
+ subject.addContent(link);
+
+ Element EventType = new Element("eventType",nmwg);
+ EventType.setText(eventType);
+
+ metadata.addContent(subject);
+ metadata.addContent(EventType);
+ metadata.addContent(parameters);
+
+ return metadata;
+
+
+
+
+ }
/**
* Method for creating metadata elements that are used for the time
@@ -471,7 +677,8 @@
// If there is a parameters entry then a metadata referring
to the time
// will be created
if (elementTable == null) {
- System.out.println("null table");
+ //System.out.println("null table");
+ return metadata;
}
if (elementTable.containsKey("parameters")) {
metadata.addContent((Element)
elementTable.get("subject"));
@@ -483,6 +690,7 @@
metadata.addContent((Element)
elementTable.get("subject"));
metadata.addContent((Element)
elementTable.get("eventType"));
} else {
+
metadata.addContent((Element)
elementTable.get("eventType"));
}
@@ -768,10 +976,174 @@
}
/**
+ * Method for checking some parameters of the key returned in the
response
+ *
+ * @param metadata
+ * The data element containing the key
+ * @param pathId
+ * The expected pathId
+ * @param ibatisConfig
+ * the expected ibatis config file value
+ * @return A boolean.True if checking was successfull.False if not.
+ */
+ public boolean checkKey(Element metadata, String pathId, String
ibatisConfig) {
+
+ // Declarations of boolean values to be used later on
+ boolean matchEventType = false;
+ boolean matchPath = false;
+ boolean matchIbatis = false;
+ // Ckecking if the id attribute of the data element exists.
+ if (metadata.getChild("key", nmwg) != null) {
+ if (metadata.getChild("key", nmwg).getAttribute("id")
!= null) {
+ // Checking if the id attribute of the
parameters element exists
+ if (metadata.getChild("key",
nmwg).getChild("parameters", nmwg)
+ .getAttribute("id") != null) {
+ // Retrieving all parameter elements
+ List parameters =
metadata.getChild("key", nmwg).getChild(
+ "parameters",
nmwg).getChildren("parameter", nmwg);
+ Iterator it = parameters.iterator();
+ while (it.hasNext()) {
+ Element parameter = (Element)
it.next();
+ // Checking the pathId
parameter
+ if
(parameter.getAttributeValue("name") != null) {
+ if
(parameter.getAttributeValue("name").equals(
+
"pathId")) {
+ if
(parameter.getText().equals(pathId)) {
+
matchPath = true;
+ }
+
+ }
+ // Checking the
eventType parameter
+ else if
(parameter.getAttributeValue("name")
+
.equals("eventType")) {
+ if
(parameter.getText().equals("Path.Status")) {
+
matchEventType = true;
+ }
+
+ }
+ // Checking the
ibatisconfig parameter
+ else if
(parameter.getAttributeValue("name")
+
.equals("ibatisConfig")) {
+ if
(parameter.getText().equals(ibatisConfig)) {
+
matchIbatis = true;
+ }
+
+ }
+ }
+ }
+ // If all parameters are ok then true
is returned.
+ if (matchEventType && matchPath &&
matchIbatis) {
+ return true;
+ } else
+ return false;
+
+ } else
+ return false;
+ } else
+ return false;
+ } else {
+ return false;
+ }
+
+ }
+
+ /**
+ * Method for checking some parameters of the key returned in the
response
+ *
+ * @param metadata
+ * The data element containing the key
+ * @param pathIdAttr
+ * The value of the name attribute of the path id parameter
+ *
+ * @param pathId
+ * The expected pathId
+ * @param ibatisConfig
+ * the expected ibatis config file value
+ * @return A boolean.True if checking was successfull.False if not.
+ */
+ public boolean checkKey(Element metadata, String pathIdAttr, String
pathId,
+ String ibatisConfig, String eventType) {
+
+ // Declarations of boolean values to be used later on
+ boolean matchEventType = false;
+ boolean matchPath = false;
+ boolean matchIbatis = false;
+ // Ckecking if the id attribute of the data element exists.
+ if (metadata.getChild("key", nmwg) != null) {
+ if (metadata.getChild("key", nmwg).getAttribute("id")
!= null) {
+ // Checking if the id attribute of the
parameters element exists
+ if (metadata.getChild("key",
nmwg).getChild("parameters", nmwg)
+ .getAttribute("id") != null) {
+ // Retrieving all parameter elements
+ List parameters =
metadata.getChild("key", nmwg).getChild(
+ "parameters",
nmwg).getChildren("parameter", nmwg);
+ Iterator it = parameters.iterator();
+ while (it.hasNext()) {
+ Element parameter = (Element)
it.next();
+ // Checking the pathId
parameter
+ if
(parameter.getAttributeValue("name") != null) {
+ if
(parameter.getAttributeValue("name").equals(
+
pathIdAttr)) {
+ if
(parameter.getText().equals(pathId)) {
+
matchPath = true;
+ }
+
+ }
+ // Checking the
eventType parameter
+ else if
(parameter.getAttributeValue("name")
+
.equals("eventType")) {
+ if
(parameter.getText().equals(eventType)) {
+
matchEventType = true;
+ //
System.out.println("ev");
+ }
+
+ }
+ // Checking the
ibatisconfig parameter
+ else if
(parameter.getAttributeValue("name")
+
.equals("ibatisConfig")) {
+ if
(parameter.getText().equals(ibatisConfig)) {
+
matchIbatis = true;
+ //
System.out.println("ib");
+ }
+
+ }
+ } else {
+ if
(pathIdAttr.equals("")) {
+ if
(parameter.getText().equals(pathId)) {
+
matchPath = true;
+ }
+ }
+ }
+ }
+ if (pathIdAttr.equals("null")) {
+ // System.out.println("pa");
+ matchPath = true;
+ }
+ // If all parameters are ok then true
is returned.
+ if (matchEventType && matchPath &&
matchIbatis) {
+ return true;
+ } else
+ return false;
+
+ } else
+ return false;
+ } else
+ return false;
+ } else {
+ return false;
+ }
+
+ }
+
+ /**
* Method for checking the time parameter of the key element
*
* @param data
* The data element containg the key
+ * @param attrValue
+ * The value of the name attribute of the time parameter
+ * @param Value
+ * The value of the ti,e parameter
* @return A boolean stating of time parameter is ok
*/
public boolean checkTimeNow(Element data, String attrValue, String
Value) {
@@ -784,10 +1156,12 @@
while (it.hasNext()) {
Element parameter = (Element) it.next();
// if time parameter exists...
- if
(parameter.getAttributeValue("name").equals(attrValue)) {
- // Check its value. If its "now" matchTime is
true
- if (parameter.getText().equals(Value)) {
- matchTime = true;
+ if (parameter.getAttribute("name") != null) {
+ if
(parameter.getAttributeValue("name").equals(attrValue)) {
+ // Check its value. If its "now"
matchTime is true
+ if
(parameter.getText().equals(Value)) {
+ matchTime = true;
+ }
}
}
}
@@ -952,6 +1326,41 @@
}
/**
+ * Method for retrieving results from the service response.
+ *
+ * @param response
+ * the response from the service
+ * @return A hash table containing the results. the keys are the
names of
+ * the links.
+ */
+ public Hashtable retrieveResults(Document response, Hashtable links) {
+ List datas = response.getRootElement().getChildren("data",
nmwg);
+ Iterator dataIt = datas.iterator();
+ Hashtable results = new Hashtable();
+
+ while (dataIt.hasNext()) {
+
+ Element data = (Element) dataIt.next();
+
+ if (data.getAttribute("metadataIdRef") != null) {
+ String link =
data.getAttributeValue("metadataIdRef");
+ String id = (String) links.get(link);
+ String[] result = null;
+ if (id != null) {
+ result = this.getDataResults(data);
+ if (result != null) {
+ result[0] = id;
+ results.put(id, result);
+ } else {
+ // To do
+ }
+ }
+ }
+ }
+ return results;
+ }
+
+ /**
* Method for retrieving the results from the data element of the
response
*
* @param data
@@ -968,7 +1377,7 @@
results[1] =
datum.getAttributeValue("timeValue");
} else {
- System.out.println("timevalue");
+ // System.out.println("timevalue");
results[1] = null;
}
Modified: trunk/functional-testing/sqlma/common/test.java
===================================================================
--- trunk/functional-testing/sqlma/common/test.java 2007-02-20 15:48:31
UTC (rev 2093)
+++ trunk/functional-testing/sqlma/common/test.java 2007-02-21 07:35:37
UTC (rev 2094)
@@ -5,6 +5,13 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Calendar;
+import java.util.Enumeration;
+import java.util.Hashtable;
public class test {
@@ -14,42 +21,87 @@
public static void main(String[] args) {
// TODO Auto-generated method stub
- Connection con = null;
+ Connection con = null;
- try {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- con =
DriverManager.getConnection("jdbc:mysql://192.168.10.86:3306/perfsonar_ma",
- "perfsonar_ma", "testpass");
+ try {
+ Class.forName("com.mysql.jdbc.Driver").newInstance();
+ con = DriverManager.getConnection(
+
"jdbc:mysql://192.168.10.86:3306/perfsonar_ma",
+ "perfsonar_ma", "testpass");
- if(!con.isClosed())
- System.out.println("Successfully connected to " +
- "MySQL server using TCP/IP...");
- Statement stm = con.createStatement();
- String query="show tables;";
- ResultSet rset = stm.executeQuery(query);
- while (rset.next()) {
-
- System.out.println(rset.getString(1));
-
- }
- query="select * from domain_link ";
- rset= stm.executeQuery(query);
-
+ java.sql.Date d = new java.sql.Date(1144500);
+
+ System.out.println(d.toString());
+ System.out.println(d.getTime());
+ System.out.println(d.toString());
+ Calendar cal = Calendar.getInstance();
+ java.sql.Date sd = new java.sql.Date(1147969952);
+ SimpleDateFormat formatter = new SimpleDateFormat(
+ "yyyy-MM-dd hh:mm:ss");
+ String time = formatter.format(d);
+ System.out.println(time);
- while (rset.next()) {
-
- System.out.print(rset.getString(1)+"
"+rset.getString(2) +" " +rset.getString(3)+ " "+rset.getString(4));
- System.out.println(rset.getString(5)+"
"+rset.getString(6));
- }
-
- } catch(Exception e) {
- System.err.println("Exception: " + e.getMessage());
- } finally {
- try {
- if(con != null)
- con.close();
- } catch(SQLException e) {}
- }
+ // if(!con.isClosed())
+ // System.out.println("Successfully connected to " +
+ // "MySQL server using TCP/IP...");
+ // Statement stm = con.createStatement();
+ // String query="show tables;";
+
+ /*
+ * ResultSet rset = stm.executeQuery(query); while
(rset.next()) {
+ *
+ * System.out.println(rset.getString(1));
+ * } // query="select * from domain_link where
time>'"+time+"' and
+ * id='DFN-link-1235'"; query = "select id,
status_oper,
+ * status_admin, unix_timestamp(time) from
domain_link where
+ * id='DFN-link-1234' and time=(select max(time) from
domain_link
+ * where id='DFN-link-1234')"; // query ="select
+ * MAX(unix_timestamp(time)) from domain_link where
+ * id='DFN-link-1234'"; //query ="select id,
status_oper,
+ * status_admin, unix_timestamp(time) as time from
domain_link where
+ * time=1169719200 and id ='DFN-link-1234'"; rset=
+ * stm.executeQuery(query);
+ *
+ *
+ * while (rset.next()) {
+ *
+ * System.out.println(rset.getString(1)+"
"+rset.getString(2) +" "
+ * +rset.getString(3)+" "+rset.getString(4)); //
+ * System.out.println(rset.getString(5)+"
"+rset.getString(6)); }
+ */
+ Statement stm = con.createStatement();
+ String query = "select id, status_oper, status_admin,
unix_timestamp(time) from domain_link where unix_timestamp(time)>=1144318523
and unix_timestamp(time)<=1147960133";
+ //ResultSet rset = stm.executeQuery(query);
+ //System.out.println(rset.getString(1));
+ SQLClient client = new SQLClient(
+
"jdbc:mysql://192.168.10.86:3306/perfsonar_ma",
+ "perfsonar_ma", "testpass");
+
+ //Hashtable resultTable =
client.executeTimeRangeQuery(1144318523,
+ // 1147960133, "", "domain_link");
+
+ Hashtable resultTable = client.executeNowQuery("",
"interdomain_link");
+
+ if (!resultTable.isEmpty()) {
+ Enumeration en=resultTable.elements();
+ while(en.hasMoreElements()){
+ String[] results = (String[])
en.nextElement();
+ System.out.println("Results:");
+ System.out.println(results[0] + " " +
results[1] + " "
+ + results[2] + " " +
results[3]);
+ }
+ } else {
+ System.out.println("Result list is empty!");
+ }
+ } catch (Exception e) {
+ System.err.println("Exception: " + e.getMessage());
+ } finally {
+ try {
+ if (con != null)
+ con.close();
+ } catch (SQLException e) {
+ }
+ }
}
}
Added: trunk/functional-testing/sqlma/common/xmlDBClient.java
Property changes on: trunk/functional-testing/sqlma/common/xmlDBClient.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified:
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreRequests.java
===================================================================
---
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreRequests.java
2007-02-20 15:48:31 UTC (rev 2093)
+++
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreRequests.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -42,6 +42,13 @@
private SQLMAFunctionalTestsUtilities utilities;
+
+ //
--------------------------------------------------------------------
+ // constructors
+
+ /**
+ * Class constructor
+ */
public MeasurementArchiveStoreRequests() {
nmwg = Namespace.getNamespace("nmwg",
@@ -62,9 +69,10 @@
utilities = new SQLMAFunctionalTestsUtilities();
}
-
+
//
-----------------------------------------------------------------------
// public methods
+
/**
* Method used for creating the requests used for testing
Modified:
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreResponseParser.java
===================================================================
---
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreResponseParser.java
2007-02-20 15:48:31 UTC (rev 2093)
+++
trunk/functional-testing/sqlma/l2/MeasurmentArchiveStoreRequest/MeasurementArchiveStoreResponseParser.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -63,6 +63,7 @@
private xmlDBClient xmlClient = null;
private SQLMAFunctionalTestsUtilities utilities;
+
//
-----------------------------------------------------------------------
// constructors
Modified:
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalRequests.java
===================================================================
---
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalRequests.java
2007-02-20 15:48:31 UTC (rev 2093)
+++
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalRequests.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -7,8 +7,6 @@
import java.util.Hashtable;
import java.util.List;
-import ls.QueryRequest.LSQueryRequests;
-
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Namespace;
Modified:
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
===================================================================
---
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
2007-02-20 15:48:31 UTC (rev 2093)
+++
trunk/functional-testing/sqlma/l2/MetadataKeyRequest/KeyRetrievalResponseParser.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -13,21 +13,13 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-import javax.xml.xpath.XPathConstants;
-import ls.RegisterRequest.LSRegisterResponseParser;
-
import org.jdom.Attribute;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Namespace;
import org.jdom.input.DOMBuilder;
import org.jdom.output.XMLOutputter;
-import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import sqlma.common.MatchElements;
@@ -86,6 +78,7 @@
public MatchElements comp;
+
//
-----------------------------------------------------------------------
// constructors
@@ -1376,6 +1369,7 @@
nodeList.add(this.node_dfn_mue);
nodeList.add(this.node_psnc_pl);
nodeList.add(this.node_psnc_pl2);
+ nodeList.add(this.node_dfn_mue);
linkList.add(this.link_psnc_dfn_mue_003);
linkList.add(this.link_psnc2_dfn_mue_004);
boolean link3 = false;
Added:
trunk/functional-testing/sqlma/l2/SetupDataRequest/MeasurementArchiveStoreRequests.java
Property changes on:
trunk/functional-testing/sqlma/l2/SetupDataRequest/MeasurementArchiveStoreRequests.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified:
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataKeyResponseParser.java
===================================================================
---
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataKeyResponseParser.java
2007-02-20 15:48:31 UTC (rev 2093)
+++
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataKeyResponseParser.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -1188,7 +1188,7 @@
return commonCheckCase_3(response,
1004318523, 1007960133);
default:
- parserLogWriter.write("Test case outside
range...");
+ parserLogWriter.write("Test case outside
range...\n");
return false;
}
@@ -1744,12 +1744,12 @@
parserLogWrite(testCase, subTestCase);
return commonCheckCase_5(response,
"error.ma.query");
default:
- parserLogWriter.write("Test case outside
range...");
+ parserLogWriter.write("Test case outside
range.\n");
return false;
}
} else {
- parserLogWriter.write("TestCase out of range");
+ parserLogWriter.write("TestCase out of range.\n");
return false;
}
}
Modified:
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataResponseParser.java
===================================================================
---
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataResponseParser.java
2007-02-20 15:48:31 UTC (rev 2093)
+++
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataResponseParser.java
2007-02-21 07:35:37 UTC (rev 2094)
@@ -107,6 +107,7 @@
//
-----------------------------------------------------------------------
// constructors
+
public SetupDataResponseParser(String databaseAddress, String
database,
String password, String configurationFile,
String validationLogFile, String parserLogFile) {
- r2094 - in trunk/functional-testing: . E2EmonMP E2EmonMP/SetupDataRequest common/echo sqlma sqlma/common sqlma/l2/MeasurmentArchiveStoreRequest sqlma/l2/MetadataKeyRequest sqlma/l2/SetupDataRequest, svnlog, 02/21/2007
Archive powered by MHonArc 2.6.16.