Author: shawkins
Date: 2012-05-25 11:11:25 -0400 (Fri, 25 May 2012)
New Revision: 4144
Modified:
trunk/client/src/main/java/org/teiid/client/security/LogonException.java
trunk/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java
trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java
trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java
trunk/common-core/src/main/java/org/teiid/core/TeiidException.java
trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java
trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java
trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java
trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java
trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java
trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java
trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java
trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java
Log:
TEIID-2022 simplifying the code/message presentation
Modified: trunk/client/src/main/java/org/teiid/client/security/LogonException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/security/LogonException.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/client/src/main/java/org/teiid/client/security/LogonException.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -43,14 +43,6 @@
public LogonException( ) {
super( );
}
- /**
- * Construct an instance with the message specified.
- *
- * @param message A message describing the exception
- */
- public LogonException( String message ) {
- super( message );
- }
/**
* Construct an instance with the message and error code specified.
@@ -66,14 +58,5 @@
super(event, t, message );
}
- /**
- * Construct an instance from a message and an exception to chain to this one.
- *
- * @param code A code denoting the exception
- * @param e An exception to nest within this one
- */
- public LogonException( Throwable e, String message ) {
- super( e, message );
- }
}
Modified: trunk/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java 2012-05-24 19:29:03
UTC (rev 4143)
+++ trunk/client/src/main/java/org/teiid/jdbc/TeiidSQLException.java 2012-05-25 15:11:25
UTC (rev 4144)
@@ -33,8 +33,8 @@
import org.teiid.client.security.InvalidSessionException;
import org.teiid.client.security.LogonException;
import org.teiid.client.util.ExceptionUtil;
-import org.teiid.core.TeiidProcessingException;
import org.teiid.core.TeiidException;
+import org.teiid.core.TeiidProcessingException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.net.CommunicationException;
import org.teiid.net.ConnectionException;
@@ -161,7 +161,6 @@
* @param exception
* @return
*/
- @SuppressWarnings("deprecation")
private static Throwable findRootException(Throwable exception) {
if (exception instanceof TeiidRuntimeException) {
while (exception.getCause() != exception
@@ -170,13 +169,13 @@
}
if (exception instanceof TeiidRuntimeException) {
TeiidRuntimeException runtimeException = (TeiidRuntimeException) exception;
- while (runtimeException.getChild() != exception
- && runtimeException.getChild() != null) {
- if (runtimeException.getChild() instanceof TeiidRuntimeException) {
+ while (runtimeException.getCause() != exception
+ && runtimeException.getCause() != null) {
+ if (runtimeException.getCause() instanceof TeiidRuntimeException) {
runtimeException = (TeiidRuntimeException) runtimeException
- .getChild();
+ .getCause();
} else {
- exception = runtimeException.getChild();
+ exception = runtimeException.getCause();
break;
}
}
Modified: trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java
===================================================================
--- trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/client/src/test/java/org/teiid/client/TestRequestMessage.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -25,15 +25,14 @@
import java.util.ArrayList;
import java.util.List;
-import org.teiid.client.RequestMessage;
+import junit.framework.TestCase;
+
import org.teiid.client.RequestMessage.ShowPlan;
import org.teiid.client.RequestMessage.StatementType;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.util.UnitTestUtil;
-import junit.framework.TestCase;
-
public class TestRequestMessage extends TestCase {
/**
@@ -48,7 +47,7 @@
RequestMessage message = new RequestMessage();
message.setStatementType(StatementType.CALLABLE);
message.setFetchSize(100);
- List params = new ArrayList();
+ List<Integer> params = new ArrayList<Integer>();
params.add(new Integer(100));
params.add(new Integer(200));
params.add(new Integer(300));
@@ -100,7 +99,7 @@
rm.setTxnAutoWrapMode("foo"); //$NON-NLS-1$
fail("exception expected"); //$NON-NLS-1$
} catch (TeiidProcessingException e) {
- assertEquals("Error Code:TEIID20000 Message:TEIID20000 'FOO' is an
invalid transaction autowrap mode.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID20000 'FOO' is an invalid transaction autowrap
mode.", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java
===================================================================
---
trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/client/src/test/java/org/teiid/net/socket/TestSocketServerConnection.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -148,7 +148,7 @@
new SocketServerConnection(instanceFactory, false, discovery, p);
fail("exception expected"); //$NON-NLS-1$
} catch (CommunicationException e) {
- assertEquals("Error Code:TEIID20021 Message:TEIID20021 No valid host available.
Attempted connections to: [host1:1, host2:2]", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID20021 No valid host available. Attempted connections to:
[host1:1, host2:2]", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/TeiidException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/TeiidException.java 2012-05-24 19:29:03
UTC (rev 4143)
+++ trunk/common-core/src/main/java/org/teiid/core/TeiidException.java 2012-05-25 15:11:25
UTC (rev 4144)
@@ -99,10 +99,11 @@
}
public String getMessage() {
- if (code == null || code.length() == 0) {
- return super.getMessage();
+ String message = super.getMessage();
+ if (code == null || code.length() == 0 || message.startsWith(code)) {
+ return message;
}
- return "Error Code:"+code+" Message:"+super.getMessage();
//$NON-NLS-1$ //$NON-NLS-2$
+ return code+" "+message; //$NON-NLS-1$
}
/**
@@ -157,17 +158,6 @@
}
/**
- * Get the exception which is linked to this exception.
- *
- * @return The linked exception
- * @see #getCause()
- * @deprecated
- */
- public Throwable getChild() {
- return super.getCause();
- }
-
- /**
* Returns a string representation of this class.
*
* @return String representation of instance
Modified: trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -137,16 +137,6 @@
//############################################################################################################################
/**
- * Get the exception which is linked to this exception.
- *
- * @return The linked exception
- * @deprecated use {@link #getCause()} instead
- */
- public Throwable getChild() {
- return this.getCause();
- }
-
- /**
* Get the error code.
*
* @return The error code
Modified: trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java
===================================================================
--- trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/common-core/src/test/java/org/teiid/core/TestMetaMatrixException.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -22,9 +22,9 @@
package org.teiid.core;
-import org.teiid.core.TeiidException;
+import static org.junit.Assert.*;
-import junit.framework.TestCase;
+import org.junit.Test;
/**
* Tests the children Iterator of the MetaMatrixException. Primarily it does
@@ -35,17 +35,9 @@
* {@link org.teiid.core.TeiidException#getChild getChild}
* method recursively.
*/
-public class TestMetaMatrixException extends TestCase {
+public class TestMetaMatrixException {
- // ################################## FRAMEWORK ################################
-
- public TestMetaMatrixException(String name) {
- super(name);
- }
-
- // ################################## ACTUAL TESTS ################################
-
- public void testFailMetaMatrixExceptionWithNullMessage() {
+ @Test public void testFailMetaMatrixExceptionWithNullMessage() {
Throwable e = null;
try {
new TeiidException((String)null); // should throw NPE
@@ -56,19 +48,15 @@
assertNotNull(e);
}
- @SuppressWarnings("deprecation")
- public void testMetaMatrixExceptionWithNullThrowable() {
+ @Test public void testMetaMatrixExceptionWithNullThrowable() {
final TeiidException err = new TeiidException((Throwable)null);
- assertNull(err.getChild());
assertNull(err.getCode());
assertNull(err.getMessage());
}
- @SuppressWarnings("deprecation")
- public void testMetaMatrixExceptionWithMessage() {
+ @Test public void testMetaMatrixExceptionWithMessage() {
final TeiidException err = new TeiidException("Test"); //$NON-NLS-1$
- assertNull(err.getChild());
assertNull(err.getCode());
assertEquals("Test", err.getMessage()); //$NON-NLS-1$
@@ -77,31 +65,26 @@
Code,
propertyValuePhrase,
}
- @SuppressWarnings("deprecation")
- public void testMetaMatrixExceptionWithCodeAndMessage() {
+ @Test public void testMetaMatrixExceptionWithCodeAndMessage() {
final TeiidException err = new TeiidException(Event.Code, "Test");
//$NON-NLS-1$
- assertNull(err.getChild());
assertEquals("Code", err.getCode()); //$NON-NLS-1$
- assertEquals("Error Code:Code Message:Test", err.getMessage());
//$NON-NLS-1$
-
+ assertEquals("Code Test", err.getMessage()); //$NON-NLS-1$
}
- @SuppressWarnings("deprecation")
- public void testMetaMatrixExceptionWithExceptionAndMessage() {
+
+ @Test public void testMetaMatrixExceptionWithExceptionAndMessage() {
final TeiidException child = new TeiidException(Event.propertyValuePhrase,
"Child"); //$NON-NLS-1$
final TeiidException err = new TeiidException(child, "Test");
//$NON-NLS-1$
- assertSame(child, err.getChild());
assertEquals("propertyValuePhrase", err.getCode()); //$NON-NLS-1$
- assertEquals("Error Code:propertyValuePhrase Message:Test",
err.getMessage()); //$NON-NLS-1$
+ assertEquals("propertyValuePhrase Test", err.getMessage());
//$NON-NLS-1$
}
- @SuppressWarnings("deprecation")
- public void testMetaMatrixExceptionWithExceptionAndCodeAndMessage() {
+
+ @Test public void testMetaMatrixExceptionWithExceptionAndCodeAndMessage() {
final TeiidException child = new TeiidException(Event.propertyValuePhrase,
"Child"); //$NON-NLS-1$
final TeiidException err = new TeiidException(Event.Code,child,
"Test"); //$NON-NLS-1$
- assertSame(child, err.getChild());
assertEquals("Code", err.getCode()); //$NON-NLS-1$
- assertEquals("Error Code:Code Message:Test", err.getMessage());
//$NON-NLS-1$
+ assertEquals("Code Test", err.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java
===================================================================
---
trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/common-core/src/test/java/org/teiid/core/crypto/TestEncryptDecrypt.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -34,10 +34,6 @@
import org.junit.BeforeClass;
import org.junit.Test;
-import org.teiid.core.crypto.BasicCryptor;
-import org.teiid.core.crypto.CryptoException;
-import org.teiid.core.crypto.Cryptor;
-import org.teiid.core.crypto.SymmetricCryptor;
/**
@@ -162,7 +158,7 @@
cryptor.encrypt( "" ); //$NON-NLS-1$
fail("expected exception"); //$NON-NLS-1$
} catch ( CryptoException e ) {
- assertEquals("Error Code:TEIID10015 Message:TEIID10015 Attempt to
encrypt zero-length cleartext.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID10015 Attempt to encrypt zero-length
cleartext.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -176,7 +172,7 @@
cryptor.encrypt( (String)null );
fail("expected exception"); //$NON-NLS-1$
} catch ( CryptoException e ) {
- assertEquals("Error Code:TEIID10014 Message:TEIID10014 Attempt to
encrypt null cleartext.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID10014 Attempt to encrypt null cleartext.",
e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java
===================================================================
---
trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/common-core/src/test/java/org/teiid/core/types/basic/TestTransforms.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -203,7 +203,7 @@
transform.transform("1"); //$NON-NLS-1$
fail("expected exception"); //$NON-NLS-1$
} catch (TransformationException e) {
- assertEquals("Error Code:TEIID10076 Message:TEIID10076 Invalid
conversion from type class java.lang.Object with value '1' to type class
java.sql.Time", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID10076 Invalid conversion from type class
java.lang.Object with value '1' to type class java.sql.Time",
e.getMessage()); //$NON-NLS-1$
}
}
@@ -233,7 +233,7 @@
}
@Test public void testStringToTimestampFails() throws Exception {
- helpTransformException("2005-12-01 11:88:60", Timestamp.class, "Error
Code:TEIID10060 Message:TEIID10060 The string representation '2005-12-01 11:88:60'
of a Timestamp value is not valid."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTransformException("2005-12-01 11:88:60", Timestamp.class,
"TEIID10060 The string representation '2005-12-01 11:88:60' of a Timestamp
value is not valid."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testStringToLongWithWS() throws Exception {
@@ -245,11 +245,11 @@
}
@Test public void testRangeCheck() throws Exception {
- helpTransformException(300, DataTypeManager.DefaultDataClasses.BYTE, "Error
Code:TEIID10058 Message:TEIID10058 The Integer value '300' is outside the of range
for Byte"); //$NON-NLS-1$
+ helpTransformException(300, DataTypeManager.DefaultDataClasses.BYTE,
"TEIID10058 The Integer value '300' is outside the of range for Byte");
//$NON-NLS-1$
}
@Test public void testRangeCheck1() throws Exception {
- helpTransformException(new Double("1E11"),
DataTypeManager.DefaultDataClasses.INTEGER, "Error Code:TEIID10058 Message:TEIID10058
The Double value '100,000,000,000' is outside the of range for Integer");
//$NON-NLS-1$ //$NON-NLS-2$
+ helpTransformException(new Double("1E11"),
DataTypeManager.DefaultDataClasses.INTEGER, "TEIID10058 The Double value
'100,000,000,000' is outside the of range for Integer"); //$NON-NLS-1$
//$NON-NLS-2$
}
Modified:
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/TestConnectorWorkItem.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -102,7 +102,7 @@
fail("Expected exception from resultset mismatch"); //$NON-NLS-1$
} catch (TranslatorException err) {
assertEquals(
- "Error Code:TEIID30479 Message:TEIID30479 Could not process stored procedure
results for EXEC spTest8(1). Expected 2 result set columns, but was 1. Please update
your models to allow for stored procedure results batching.", err.getMessage());
//$NON-NLS-1$
+ "TEIID30479 Could not process stored procedure results for EXEC spTest8(1).
Expected 2 result set columns, but was 1. Please update your models to allow for stored
procedure results batching.", err.getMessage()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestCallableStatement.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -44,7 +44,7 @@
TestPreparedStatement.helpTestProcessing(sql, Collections.EMPTY_LIST, null, new
HardcodedDataManager(), RealMetadataFactory.exampleBQTCached(), true,
RealMetadataFactory.exampleBQTVDB());
fail();
} catch (QueryResolverException e) {
- assertEquals("Error Code:TEIID30089 Message:TEIID30089 Required parameter
'pm4.spTest9.inkey' has no value was set or is an invalid parameter.",
e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30089 Required parameter 'pm4.spTest9.inkey' has no
value was set or is an invalid parameter.", e.getMessage()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestPreparedStatement.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -307,7 +307,7 @@
helpGetProcessorPlan(preparedSql, values, prepCache, SESSION_ID);
fail();
}catch(QueryResolverException qe){
- assertEquals("Error Code:TEIID30558 Message:Error converting parameter
number 1 with value \"x\" to expected type integer.", qe.getMessage());
//$NON-NLS-1$
+ assertEquals("TEIID30558 Error converting parameter number 1 with value
\"x\" to expected type integer.", qe.getMessage()); //$NON-NLS-1$
}
assertEquals(0, prepCache.getCacheHitCount());
@@ -319,7 +319,7 @@
helpGetProcessorPlan(preparedSql, values, prepCache, SESSION_ID);
fail();
}catch(QueryResolverException qe){
- assertEquals("Error Code:TEIID30556 Message:The number of bound values
'2' does not match the number of parameters '1' in the prepared
statement.", qe.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30556 The number of bound values '2' does not
match the number of parameters '1' in the prepared statement.",
qe.getMessage()); //$NON-NLS-1$
}
assertEquals(1, prepCache.getCacheHitCount());
@@ -332,7 +332,7 @@
helpGetProcessorPlan(preparedSql, values, prepCache);
fail();
}catch(QueryResolverException qe){
- assertEquals("Error Code:TEIID30556 Message:The number of bound values
'2' does not match the number of parameters '1' in the prepared
statement.", qe.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30556 The number of bound values '2' does not match
the number of parameters '1' in the prepared statement.", qe.getMessage());
//$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestTransactionServer.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -76,7 +76,7 @@
server.start(THREAD1, XID1, XAResource.TMNOFLAGS, 100, false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30523 Message:TEIID30523 Client thread
already involved in a transaction. Transaction nesting is not supported. The current
transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("TEIID30523 Client thread already involved in a
transaction. Transaction nesting is not supported. The current transaction must be
completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -91,7 +91,7 @@
server.begin(THREAD1);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30526
Message:javax.transaction.InvalidTransactionException: Client thread already involved in a
transaction. Transaction nesting is not supported. The current transaction must be
completed first.", //$NON-NLS-1$
+ assertEquals("TEIID30526 javax.transaction.InvalidTransactionException:
Client thread already involved in a transaction. Transaction nesting is not supported. The
current transaction must be completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -106,7 +106,7 @@
server.start(THREAD2, XID1, XAResource.TMNOFLAGS, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30522 Message:TEIID30522 Global
transaction Teiid-Xid global:1 branch:null format:0 already exists.",
ex.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30522 Global transaction Teiid-Xid global:1
branch:null format:0 already exists.", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -120,7 +120,7 @@
server.start(THREAD1, XID2, XAResource.TMNOFLAGS, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30523 Message:TEIID30523 Client thread
already involved in a transaction. Transaction nesting is not supported. The current
transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("TEIID30523 Client thread already involved in a
transaction. Transaction nesting is not supported. The current transaction must be
completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -135,7 +135,7 @@
server.begin(THREAD1);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30526
Message:javax.transaction.InvalidTransactionException: Client thread already involved in a
transaction. Transaction nesting is not supported. The current transaction must be
completed first.", //$NON-NLS-1$
+ assertEquals("TEIID30526 javax.transaction.InvalidTransactionException:
Client thread already involved in a transaction. Transaction nesting is not supported. The
current transaction must be completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -152,7 +152,7 @@
server.start(THREAD1, XID2, XAResource.TMJOIN, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30517 Message:TEIID30517 Client thread
already involved in a transaction. Transaction nesting is not supported. The current
transaction must be completed first.", //$NON-NLS-1$
+ assertEquals("TEIID30517 Client thread already involved in a
transaction. Transaction nesting is not supported. The current transaction must be
completed first.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -166,7 +166,7 @@
try {
server.commit(THREAD1);
} catch (XATransactionException e) {
- assertEquals("Error Code:TEIID30526
Message:javax.transaction.InvalidTransactionException: No transaction found for client
abc1.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30526 javax.transaction.InvalidTransactionException:
No transaction found for client abc1.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -186,7 +186,7 @@
try {
server.rollback(THREAD1);
} catch (XATransactionException e) {
- assertEquals("Error Code:TEIID30526
Message:javax.transaction.InvalidTransactionException: No transaction found for client
abc1.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30526 javax.transaction.InvalidTransactionException:
No transaction found for client abc1.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -197,7 +197,7 @@
server.start(THREAD1, XID1, XAResource.TMJOIN, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30525 Message:TEIID30525 Concurrent
enlistment in global transaction Teiid-Xid global:1 branch:null format:0 is not
supported.", //$NON-NLS-1$
+ assertEquals("TEIID30525 Concurrent enlistment in global transaction
Teiid-Xid global:1 branch:null format:0 is not supported.", //$NON-NLS-1$
ex.getMessage());
}
}
@@ -210,7 +210,7 @@
server.end(THREAD1, XID1, XAResource.TMSUSPEND,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30524 Message:TEIID30524 Client is not
currently enlisted in transaction Teiid-Xid global:1 branch:null format:0.",
ex.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30524 Client is not currently enlisted in transaction
Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -224,7 +224,7 @@
server.start(THREAD2, XID1, XAResource.TMRESUME, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30518 Message:TEIID30518 Cannot resume,
transaction Teiid-Xid global:1 branch:null format:0 was not suspended by client
abc2.", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30518 Cannot resume, transaction Teiid-Xid global:1
branch:null format:0 was not suspended by client abc2.", ex.getMessage());
//$NON-NLS-1$
}
}
@@ -233,7 +233,7 @@
server.start(THREAD1, XID1, Integer.MAX_VALUE, 100,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30519 Message:TEIID30519 Unknown START
flags", ex.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30519 Unknown START flags", ex.getMessage());
//$NON-NLS-1$
}
}
@@ -242,7 +242,7 @@
server.end(THREAD1, XID1, XAResource.TMSUCCESS,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30521 Message:TEIID30521 No global
transaction found for Teiid-Xid global:1 branch:null format:0.", ex.getMessage());
//$NON-NLS-1$
+ assertEquals("TEIID30521 No global transaction found for Teiid-Xid
global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
}
}
@@ -254,7 +254,7 @@
server.prepare(THREAD1, XID1,false);
fail("exception expected"); //$NON-NLS-1$
} catch (XATransactionException ex) {
- assertEquals("Error Code:TEIID30505 Message:TEIID30505 Suspended work
still exists on transaction Teiid-Xid global:1 branch:null format:0.",
ex.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30505 Suspended work still exists on transaction
Teiid-Xid global:1 branch:null format:0.", ex.getMessage()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/metadata/TestTransformationMetadata.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -22,8 +22,7 @@
package org.teiid.query.metadata;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
@@ -55,7 +54,7 @@
tm.getStoredProcedureInfoForProcedure("y"); //$NON-NLS-1$
fail("expected exception"); //$NON-NLS-1$
} catch (QueryMetadataException e) {
- assertEquals("Error Code:TEIID30358 Message:TEIID30358 Procedure 'y' is
ambiguous, use the fully qualified name instead", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30358 Procedure 'y' is ambiguous, use the fully
qualified name instead", e.getMessage()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -147,7 +147,7 @@
} catch (QueryPlannerException err) {
//This SHOULD happen.
final String msg = err.getMessage();
- final String expected = "Error Code:TEIID30278 Message:TEIID30278 Group
has an access pattern which has not been met: group(s) [pm4.g1]; access pattern(s) [Access
Pattern: Unsatisfied [pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
+ final String expected = "TEIID30278 Group has an access pattern which
has not been met: group(s) [pm4.g1]; access pattern(s) [Access Pattern: Unsatisfied
[pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
assertEquals("Did not fail with expected QueryPlannerException",
expected, msg); //$NON-NLS-1$
}
}
@@ -167,7 +167,7 @@
} catch (QueryPlannerException err) {
//This SHOULD happen.
final String msg = err.getMessage();
- final String expected = "Error Code:TEIID30278 Message:TEIID30278 Group
has an access pattern which has not been met: group(s) [pm4.g1]; access pattern(s) [Access
Pattern: Unsatisfied [pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
+ final String expected = "TEIID30278 Group has an access pattern which
has not been met: group(s) [pm4.g1]; access pattern(s) [Access Pattern: Unsatisfied
[pm4.g1.e1] History [[pm4.g1.e1]]]"; //$NON-NLS-1$
assertEquals("Did not fail with expected QueryPlannerException",
expected, msg); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/processor/TestProcedureRelational.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -604,7 +604,7 @@
TestProcessor.doProcess(plan, dataManager, expected,
TestProcessor.createCommandContext());
fail("QueryPlannerException was expected."); //$NON-NLS-1$
} catch (QueryValidatorException e) {
- assertEquals("Error Code:TEIID30164 Message:TEIID30164 The procedure
parameter pm1.vsp26.param2 is not nullable, but is set to null.",e.getMessage());
//$NON-NLS-1$
+ assertEquals("TEIID30164 The procedure parameter pm1.vsp26.param2 is not
nullable, but is set to null.",e.getMessage()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestCriteriaEvaluator.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -318,7 +318,7 @@
try {
helpTestMatch("abc", "a", 'a', true);
//$NON-NLS-1$ //$NON-NLS-2$
} catch (ExpressionEvaluationException cee) {
- assertEquals("Error Code:TEIID30449 Message:TEIID30449 Invalid escape
sequence \"a\" with escape character \"a\"", cee.getMessage());
//$NON-NLS-1$
+ assertEquals("TEIID30449 Invalid escape sequence \"a\" with
escape character \"a\"", cee.getMessage()); //$NON-NLS-1$
}
}
@@ -327,7 +327,7 @@
try {
helpTestMatch("abc", "ab", 'a', true);
//$NON-NLS-1$ //$NON-NLS-2$
} catch (ExpressionEvaluationException cee) {
- assertEquals("Error Code:TEIID30449 Message:TEIID30449 Invalid escape
sequence \"ab\" with escape character \"a\"", cee.getMessage());
//$NON-NLS-1$
+ assertEquals("TEIID30449 Invalid escape sequence \"ab\" with
escape character \"a\"", cee.getMessage()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/processor/eval/TestExpressionEvaluator.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -51,7 +51,15 @@
import org.teiid.query.sql.lang.Query;
import org.teiid.query.sql.lang.QueryCommand;
import org.teiid.query.sql.lang.SubqueryContainer;
-import org.teiid.query.sql.symbol.*;
+import org.teiid.query.sql.symbol.CaseExpression;
+import org.teiid.query.sql.symbol.Constant;
+import org.teiid.query.sql.symbol.ElementSymbol;
+import org.teiid.query.sql.symbol.Expression;
+import org.teiid.query.sql.symbol.Function;
+import org.teiid.query.sql.symbol.ScalarSubquery;
+import org.teiid.query.sql.symbol.SearchedCaseExpression;
+import org.teiid.query.sql.symbol.TestCaseExpression;
+import org.teiid.query.sql.symbol.TestSearchedCaseExpression;
import org.teiid.query.sql.util.ValueIterator;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.util.CommandContext;
@@ -176,7 +184,7 @@
fail("Exception expected"); //$NON-NLS-1$
} catch (TeiidComponentException e){
//this should be a componentexception, since it is unexpected
- assertEquals(e.getMessage(), "Error Code:TEIID30346 Message:TEIID30346
Unable to evaluate e2: No value was available"); //$NON-NLS-1$
+ assertEquals(e.getMessage(), "TEIID30346 Unable to evaluate e2: No value
was available"); //$NON-NLS-1$
}
}
@@ -296,7 +304,7 @@
helpTestWithValueIterator(expr, values, null);
fail("Expected ExpressionEvaluationException but got none");
//$NON-NLS-1$
} catch (ExpressionEvaluationException e) {
- assertEquals("Error Code:TEIID30328 Message:TEIID30328 Unable to
evaluate (SELECT x FROM y): Error Code:TEIID30345 Message:TEIID30345 The command of this
scalar subquery returned more than one value: SELECT x FROM y", e.getMessage());
//$NON-NLS-1$
+ assertEquals("TEIID30328 Unable to evaluate (SELECT x FROM y):
TEIID30345 The command of this scalar subquery returned more than one value: SELECT x FROM
y", e.getMessage()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/processor/proc/TestProcedureProcessor.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -991,7 +991,7 @@
helpTestProcessFailure(plan,
dataMgr,
- "Error Code:TEIID30168 Message:TEIID30168
Couldn't execute the dynamic SQL command \"EXECUTE IMMEDIATE 'EXEC
pm1.sq2(''First'')' AS e1 string, e2 integer\" with the SQL
statement \"'EXEC pm1.sq2(''First'')'\" due to: Error
Code:TEIID30347 Message:TEIID30347 There is a recursive invocation of group
'pm1.sq2'. Please correct the SQL.", metadata); //$NON-NLS-1$
+ "TEIID30168 Couldn't execute the dynamic SQL
command \"EXECUTE IMMEDIATE 'EXEC pm1.sq2(''First'')' AS e1
string, e2 integer\" with the SQL statement \"'EXEC
pm1.sq2(''First'')'\" due to: TEIID30347 There is a recursive
invocation of group 'pm1.sq2'. Please correct the SQL.", metadata);
//$NON-NLS-1$
}
@Test public void testDynamicCommandIncorrectProjectSymbolCount() throws Exception {
@@ -1012,7 +1012,7 @@
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
- helpTestProcessFailure(plan, dataMgr, "Error Code:TEIID30168
Message:TEIID30168 Couldn't execute the dynamic SQL command \"EXECUTE IMMEDIATE
'EXEC pm1.sq1(''First'')' AS e1 string, e2 integer\" with the
SQL statement \"'EXEC pm1.sq1(''First'')'\" due to: The
dynamic sql string contains an incorrect number of elements.", metadata);
//$NON-NLS-1$
+ helpTestProcessFailure(plan, dataMgr, "TEIID30168 Couldn't execute the
dynamic SQL command \"EXECUTE IMMEDIATE 'EXEC
pm1.sq1(''First'')' AS e1 string, e2 integer\" with the SQL
statement \"'EXEC pm1.sq1(''First'')'\" due to: The
dynamic sql string contains an incorrect number of elements.", metadata);
//$NON-NLS-1$
}
@Test public void testDynamicCommandPositional() throws Exception {
@@ -1045,7 +1045,7 @@
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
- helpTestProcessFailure(plan, dataMgr, "Error Code:TEIID30168
Message:TEIID30168 Couldn't execute the dynamic SQL command \"EXECUTE IMMEDIATE
'select e1 from pm1.g1'\" with the SQL statement \"'select e1 from
pm1.g1'\" due to: The datatype 'string' for element 'e1' in the
dynamic SQL cannot be implicitly converted to 'integer'.", metadata);
//$NON-NLS-1$
+ helpTestProcessFailure(plan, dataMgr, "TEIID30168 Couldn't execute the
dynamic SQL command \"EXECUTE IMMEDIATE 'select e1 from pm1.g1'\" with
the SQL statement \"'select e1 from pm1.g1'\" due to: The datatype
'string' for element 'e1' in the dynamic SQL cannot be implicitly
converted to 'integer'.", metadata); //$NON-NLS-1$
}
@Test public void testDynamicCommandWithTwoDynamicStatements() throws Exception {
@@ -1322,7 +1322,7 @@
ProcessorPlan plan = getProcedurePlan(userUpdateStr, metadata);
- helpTestProcessFailure(plan, dataMgr, "Error Code:TEIID30229
Message:TEIID30229 Temporary table \"T1\" already exists.", metadata);
//$NON-NLS-1$
+ helpTestProcessFailure(plan, dataMgr, "TEIID30229 Temporary table
\"T1\" already exists.", metadata); //$NON-NLS-1$
}
/**
Modified:
trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/processor/relational/TestProjectNode.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -247,7 +247,7 @@
Arrays.asList(new Object[] { "1" }), //$NON-NLS-1$
Arrays.asList(new Object[] { "2x" }) }; //$NON-NLS-1$
- String expectedMessage = "ERROR CODE:TEIID30328 MESSAGE:TEIID30328 Unable to
evaluate convert(e1, integer): ERROR CODE:TEIID30384 MESSAGE:TEIID30384 Error while
evaluating function convert"; //$NON-NLS-1$
+ String expectedMessage = "TEIID30328 Unable to evaluate convert(e1,
integer): TEIID30384 Error while evaluating function convert"; //$NON-NLS-1$
helpTestProjectFails(projectElements, data, elements, expectedMessage);
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/processor/xml/TestXMLProcessor.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -3325,7 +3325,7 @@
"", metadata, dataMgr); //$NON-NLS-1$
fail("Should have failed with QueryPlannerException but
didn't"); //$NON-NLS-1$
} catch (QueryPlannerException e) {
- String expectedMsg = "Error Code:TEIID30288 Message:TEIID30288 The XML
document element [element] name='Suppliers' minOccurs=1 maxOccurs=1 is not mapped
to data and cannot be used in the ORDER BY clause: ORDER BY Suppliers";
//$NON-NLS-1$
+ String expectedMsg = "TEIID30288 The XML document element [element]
name='Suppliers' minOccurs=1 maxOccurs=1 is not mapped to data and cannot be used
in the ORDER BY clause: ORDER BY Suppliers"; //$NON-NLS-1$
assertEquals(expectedMsg, e.getMessage());
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/resolver/TestFunctionResolving.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -23,6 +23,7 @@
package org.teiid.query.resolver;
import static org.junit.Assert.*;
+
import org.junit.Test;
import org.teiid.api.exception.query.QueryParserException;
import org.teiid.api.exception.query.QueryResolverException;
@@ -48,7 +49,7 @@
ResolverVisitor.resolveLanguageObject(function,
RealMetadataFactory.example1Cached());
fail("excpetion expected"); //$NON-NLS-1$
} catch (QueryResolverException err) {
- assertEquals("Error Code:TEIID30071 Message:TEIID30071 The conversion
from char to date is not allowed.", err.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30071 The conversion from char to date is not
allowed.", err.getMessage()); //$NON-NLS-1$
}
}
@@ -80,7 +81,7 @@
ResolverVisitor.resolveLanguageObject(function,
RealMetadataFactory.example1Cached());
fail("excpetion expected"); //$NON-NLS-1$
} catch (QueryResolverException err) {
- assertEquals("Error Code:TEIID30069 Message:TEIID30069 The function
'LCASE(?)' has more than one possible signature.", err.getMessage());
//$NON-NLS-1$
+ assertEquals("TEIID30069 The function 'LCASE(?)' has more than
one possible signature.", err.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-05-24
19:29:03 UTC (rev 4143)
+++
trunk/engine/src/test/java/org/teiid/query/resolver/TestProcedureResolving.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -738,7 +738,7 @@
String userQuery = "UPDATE vm1.g3 SET x='x' where e3= 1";
//$NON-NLS-1$
helpFailUpdateProcedure(procedure, userQuery,
- Table.TriggerEvent.UPDATE, "Error Code:TEIID30126 Message:TEIID30126
Column variables do not reference columns on group \"pm1.g1\": [Unable to
resolve 'var1': Element \"var1\" is not defined by any relevant
group.]"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "TEIID30126 Column variables do not
reference columns on group \"pm1.g1\": [Unable to resolve 'var1':
Element \"var1\" is not defined by any relevant group.]"); //$NON-NLS-1$
}
// variables cannot be used among insert elements
@@ -753,7 +753,7 @@
String userQuery = "UPDATE vm1.g3 SET x='x' where e3= 1";
//$NON-NLS-1$
helpFailUpdateProcedure(procedure, userQuery,
- Table.TriggerEvent.UPDATE, "Error Code:TEIID30126 Message:TEIID30126
Column variables do not reference columns on group \"pm1.g1\": [Unable to
resolve 'INPUTS.x': Symbol INPUTS.x is specified with an unknown group
context]"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "TEIID30126 Column variables do not
reference columns on group \"pm1.g1\": [Unable to resolve 'INPUTS.x':
Symbol INPUTS.x is specified with an unknown group context]"); //$NON-NLS-1$
}
//should resolve first to the table's column
@@ -798,7 +798,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'";
//$NON-NLS-1$
helpFailUpdateProcedure(proc.toString(), userUpdateStr,
- Table.TriggerEvent.UPDATE, "Error
Code:TEIID30124 Message:TEIID30124 Nested Loop can not use the same cursor name as that of
its parent."); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "TEIID30124 Nested
Loop can not use the same cursor name as that of its parent."); //$NON-NLS-1$
}
@Test public void testTempGroupElementShouldNotBeResolable() {
@@ -855,7 +855,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'";
//$NON-NLS-1$
- helpFailUpdateProcedure(proc.toString(), userUpdateStr,
Table.TriggerEvent.UPDATE, "Error Code:TEIID30118 Message:TEIID30118 Cannot create
temporary table \"loopCursor\". An object with the same name already
exists."); //$NON-NLS-1$
+ helpFailUpdateProcedure(proc.toString(), userUpdateStr,
Table.TriggerEvent.UPDATE, "TEIID30118 Cannot create temporary table
\"loopCursor\". An object with the same name already exists.");
//$NON-NLS-1$
}
@Test public void testProcedureCreateDrop() {
@@ -937,7 +937,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1=1"; //$NON-NLS-1$
helpFailUpdateProcedure(procedure, userUpdateStr,
- Table.TriggerEvent.UPDATE, "Error Code:TEIID30082 Message:Cannot set symbol
'pm1.g1.e4' with expected type double to expression 'convert(var1,
string)'"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "TEIID30082 Cannot set symbol 'pm1.g1.e4'
with expected type double to expression 'convert(var1, string)'");
//$NON-NLS-1$
}
// special variable INPUT compared against invalid type
@@ -952,7 +952,7 @@
String userUpdateStr = "UPDATE vm1.g1 SET e1='x'";
//$NON-NLS-1$
helpFailUpdateProcedure(procedure, userUpdateStr,
- Table.TriggerEvent.UPDATE, "Error Code:TEIID30082 Message:Cannot set symbol
'pm1.g1.e2' with expected type integer to expression
'\"new\".e1'"); //$NON-NLS-1$
+ Table.TriggerEvent.UPDATE, "TEIID30082 Cannot set symbol 'pm1.g1.e2'
with expected type integer to expression '\"new\".e1'");
//$NON-NLS-1$
}
@Test public void testVirtualProcedure() throws Exception {
@@ -969,7 +969,7 @@
//cursor starts with "#" Defect14924
@Test public void testVirtualProcedureInvalid1() throws Exception {
- helpResolveException("EXEC
pm1.vsp32()",RealMetadataFactory.example1Cached(), "Error Code:TEIID30125
Message:Cursor names cannot begin with \"#\" as that indicates the name of a
temporary table: #mycursor."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("EXEC
pm1.vsp32()",RealMetadataFactory.example1Cached(), "TEIID30125 Cursor names
cannot begin with \"#\" as that indicates the name of a temporary table:
#mycursor."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testVirtualProcedureWithOrderBy() throws Exception {
@@ -993,7 +993,7 @@
}
@Test public void testLoopRedefinition2() throws Exception {
- helpResolveException("EXEC pm1.vsp11()",
RealMetadataFactory.example1Cached(), "Error Code:TEIID30124 Message:TEIID30124
Nested Loop can not use the same cursor name as that of its parent."); //$NON-NLS-1$
//$NON-NLS-2$
+ helpResolveException("EXEC pm1.vsp11()",
RealMetadataFactory.example1Cached(), "TEIID30124 Nested Loop can not use the same
cursor name as that of its parent."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testVariableResolutionWithIntervening() throws Exception {
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -799,7 +799,7 @@
}
@Test public void testUnknownFunction() {
- helpResolveException("SELECT abc(e1) FROM pm1.g1", "Error
Code:TEIID30068 Message:TEIID30068 The function 'abc(e1)' is an unknown form.
Check that the function name and number of arguments is correct."); //$NON-NLS-1$
//$NON-NLS-2$
+ helpResolveException("SELECT abc(e1) FROM pm1.g1", "TEIID30068 The
function 'abc(e1)' is an unknown form. Check that the function name and number of
arguments is correct."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testConversionPossible() {
@@ -1405,7 +1405,7 @@
}
@Test public void testFailedConversion_defect9725() throws Exception{
- helpResolveException("select * from pm3.g1 where pm3.g1.e4 > {b
'true'}", "Error Code:TEIID30072 Message:TEIID30072 The expressions in
this criteria are being compared but are of differing types (timestamp and boolean) and no
implicit conversion is available: pm3.g1.e4 > TRUE"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select * from pm3.g1 where pm3.g1.e4 > {b
'true'}", "TEIID30072 The expressions in this criteria are being
compared but are of differing types (timestamp and boolean) and no implicit conversion is
available: pm3.g1.e4 > TRUE"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testLookupFunction() {
@@ -1904,11 +1904,11 @@
* the group g1 is not known to the order by clause of a union
*/
@Test public void testUnionOrderByFail() {
- helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1
FROM pm1.g2 ORDER BY g1.e1", "Error Code:TEIID30086 Message:TEIID30086 ORDER BY
expression 'g1.e1' cannot be used with a set query."); //$NON-NLS-1$
//$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1
FROM pm1.g2 ORDER BY g1.e1", "TEIID30086 ORDER BY expression 'g1.e1'
cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUnionOrderByFail1() {
- helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1
FROM pm1.g2 ORDER BY pm1.g1.e1", "Error Code:TEIID30086 Message:TEIID30086 ORDER
BY expression 'pm1.g1.e1' cannot be used with a set query."); //$NON-NLS-1$
//$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1
FROM pm1.g2 ORDER BY pm1.g1.e1", "TEIID30086 ORDER BY expression
'pm1.g1.e1' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testOrderByPartiallyQualified() {
@@ -2136,7 +2136,7 @@
}
@Test public void testParameterError() throws Exception {
- helpResolveException("EXEC pm1.sp2(1, 2)", metadata, "Error
Code:TEIID30142 Message:TEIID30142 Incorrect number of parameters specified on the stored
procedure pm1.sp2 - expected 1 but got 2"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("EXEC pm1.sp2(1, 2)", metadata, "TEIID30142
Incorrect number of parameters specified on the stored procedure pm1.sp2 - expected 1 but
got 2"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUnionOfAliasedLiteralsGetsModified() {
@@ -2263,7 +2263,7 @@
procedure = procedure + "DECLARE string VARIABLES.X = 1;\n";
//$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
- helpResolveException(procedure, "Error Code:TEIID30136 Message:TEIID30136
Unable to resolve element: VARIABLES.X"); //$NON-NLS-1$
+ helpResolveException(procedure, "TEIID30136 Unable to resolve element:
VARIABLES.X"); //$NON-NLS-1$
}
@Test public void testCreate() {
@@ -2274,7 +2274,7 @@
@Test public void testCreateQualifiedName() {
String sql = "CREATE LOCAL TEMPORARY TABLE pm1.g1 (column1 string)";
//$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30117 Message:TEIID30117 Cannot
create temporary table \"pm1.g1\". Local temporary tables must be created with
unqualified names."); //$NON-NLS-1$
+ helpResolveException(sql, "TEIID30117 Cannot create temporary table
\"pm1.g1\". Local temporary tables must be created with unqualified
names."); //$NON-NLS-1$
}
@Test public void testProcedureConflict() {
@@ -2294,7 +2294,7 @@
@Test public void testCreateAlreadyExists() {
String sql = "CREATE LOCAL TEMPORARY TABLE g1 (column1 string)";
//$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30118 Message:TEIID30118 Cannot
create temporary table \"g1\". An object with the same name already
exists."); //$NON-NLS-1$
+ helpResolveException(sql, "TEIID30118 Cannot create temporary table
\"g1\". An object with the same name already exists."); //$NON-NLS-1$
}
@Test public void testCreateImplicitName() {
@@ -2304,7 +2304,7 @@
}
@Test public void testCreateInProc() throws Exception{
- helpResolveException("CREATE VIRTUAL PROCEDURE BEGIN create local temporary
table g1(c1 string); end", "Error Code:TEIID30118 Message:TEIID30118 Cannot
create temporary table \"g1\". An object with the same name already
exists.");//$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("CREATE VIRTUAL PROCEDURE BEGIN create local temporary
table g1(c1 string); end", "TEIID30118 Cannot create temporary table
\"g1\". An object with the same name already exists.");//$NON-NLS-1$
//$NON-NLS-2$
}
//this was the old virt.agg procedure. It was defined in such a way that relied on
the scope leak of #temp
@@ -2399,7 +2399,7 @@
@Test public void testLookupWithoutConstant() throws Exception{
String sql = "SELECT lookup('pm1.g1', convert('e3', float),
'e2', e2) FROM pm1.g1"; //$NON-NLS-1$
- helpResolveException(sql, metadata, "Error Code:TEIID30095
Message:TEIID30095 The first three arguments for the LOOKUP function must be specified as
constants."); //$NON-NLS-1$
+ helpResolveException(sql, metadata, "TEIID30095 The first three arguments
for the LOOKUP function must be specified as constants."); //$NON-NLS-1$
}
/**
@@ -2420,19 +2420,19 @@
@Test public void testUpdateError() {
String userUpdateStr = "UPDATE vm1.g2 SET e1='x'";
//$NON-NLS-1$
- helpResolveException(userUpdateStr, metadata, "Error Code:TEIID30061
Message:TEIID30061 Update is not allowed on the view vm1.g2: a procedure must be defined
to handle the Update."); //$NON-NLS-1$
+ helpResolveException(userUpdateStr, metadata, "TEIID30061 Update is not
allowed on the view vm1.g2: a procedure must be defined to handle the Update.");
//$NON-NLS-1$
}
@Test public void testInsertError() {
String userUpdateStr = "INSERT into vm1.g2 (e1) values ('x')";
//$NON-NLS-1$
- helpResolveException(userUpdateStr, metadata, "Error Code:TEIID30061
Message:TEIID30061 Insert is not allowed on the view vm1.g2: a procedure must be defined
to handle the Insert."); //$NON-NLS-1$
+ helpResolveException(userUpdateStr, metadata, "TEIID30061 Insert is not
allowed on the view vm1.g2: a procedure must be defined to handle the Insert.");
//$NON-NLS-1$
}
@Test public void testDeleteError() {
String userUpdateStr = "DELETE from vm1.g2 where e1='x'";
//$NON-NLS-1$
- helpResolveException(userUpdateStr, metadata, "Error Code:TEIID30061
Message:TEIID30061 Delete is not allowed on the view vm1.g2: a procedure must be defined
to handle the Delete."); //$NON-NLS-1$
+ helpResolveException(userUpdateStr, metadata, "TEIID30061 Delete is not
allowed on the view vm1.g2: a procedure must be defined to handle the Delete.");
//$NON-NLS-1$
}
@Test public void testResolveXMLSelect() {
@@ -2442,13 +2442,13 @@
procedure = procedure + "select VARIABLES.X from xmltest.doc1;\n";
//$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
- helpResolveException(procedure, "Error Code:TEIID30136 Message:TEIID30136
Unable to resolve element: VARIABLES.X"); //$NON-NLS-1$
+ helpResolveException(procedure, "TEIID30136 Unable to resolve element:
VARIABLES.X"); //$NON-NLS-1$
}
@Test public void testXMLJoinFail() {
String query = "select * from xmltest.doc1, xmltest.doc2";
//$NON-NLS-1$
- helpResolveException(query, "Error Code:TEIID30112 Message:TEIID30112 Only
one XML document may be specified in the FROM clause of a query."); //$NON-NLS-1$
+ helpResolveException(query, "TEIID30112 Only one XML document may be
specified in the FROM clause of a query."); //$NON-NLS-1$
}
@Test public void testExecProjectedSymbols() {
@@ -2478,7 +2478,7 @@
QueryMetadataInterface metadata =
RealMetadataFactory.createTransformationMetadata(metadataStore, "example1");
- helpResolveException("select * from pm1.sq2", metadata, "Error
Code:TEIID30114 Message:TEIID30114 Cannot access procedure pm1.sq2 using table semantics
since the parameter and result set column names are not all unique."); //$NON-NLS-1$
//$NON-NLS-2$
+ helpResolveException("select * from pm1.sq2", metadata,
"TEIID30114 Cannot access procedure pm1.sq2 using table semantics since the parameter
and result set column names are not all unique."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testInlineViewNullLiteralInUnion() {
@@ -2490,21 +2490,21 @@
@Test public void testSelectIntoWithDuplicateNames() {
String sql = "select 1 as x, 2 as x into #temp"; //$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30091 Message:TEIID30091 Cannot
create group '#temp' with multiple columns named 'x'");
//$NON-NLS-1$
+ helpResolveException(sql, "TEIID30091 Cannot create group '#temp'
with multiple columns named 'x'"); //$NON-NLS-1$
}
@Test public void testCreateWithDuplicateNames() {
String sql = "CREATE LOCAL TEMPORARY TABLE temp_table (column1 string,
column1 string)"; //$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30091 Message:TEIID30091 Cannot
create group \'temp_table\' with multiple columns named
\'column1\'"); //$NON-NLS-1$
+ helpResolveException(sql, "TEIID30091 Cannot create group
\'temp_table\' with multiple columns named \'column1\'");
//$NON-NLS-1$
}
@Test public void testXMLQuery4() {
- helpResolveException("SELECT * FROM xmltest.doc1 group by a2",
"Error Code:TEIID30130 Message:TEIID30130 Queries against XML documents can not have
a GROUP By clause"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT * FROM xmltest.doc1 group by a2",
"TEIID30130 Queries against XML documents can not have a GROUP By clause");
//$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testXMLQuery5() {
- helpResolveException("SELECT * FROM xmltest.doc1 having
a2='x'", "Error Code:TEIID30131 Message:TEIID30131 Queries against XML
documents can not have a HAVING clause"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT * FROM xmltest.doc1 having
a2='x'", "TEIID30131 Queries against XML documents can not have a HAVING
clause"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testSelectIntoWithOrderBy() {
@@ -2514,8 +2514,8 @@
}
@Test public void testUnionBranchesWithDifferentElementCounts() {
- helpResolveException("SELECT e2, e3 FROM pm1.g1 UNION SELECT e2 FROM
pm1.g2","Error Code:TEIID30147 Message:TEIID30147 Queries combined with the set
operator UNION must have the same number of output elements."); //$NON-NLS-1$
//$NON-NLS-2$
- helpResolveException("SELECT e2 FROM pm1.g1 UNION SELECT e2, e3 FROM
pm1.g2","Error Code:TEIID30147 Message:TEIID30147 Queries combined with the set
operator UNION must have the same number of output elements."); //$NON-NLS-1$
//$NON-NLS-2$
+ helpResolveException("SELECT e2, e3 FROM pm1.g1 UNION SELECT e2 FROM
pm1.g2","TEIID30147 Queries combined with the set operator UNION must have the
same number of output elements."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT e2 FROM pm1.g1 UNION SELECT e2, e3 FROM
pm1.g2","TEIID30147 Queries combined with the set operator UNION must have the
same number of output elements."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testSelectIntoWithNullLiteral() {
@@ -2545,19 +2545,19 @@
@Test public void testInsertWithoutColumnsFails() {
String sql = "Insert into pm1.g1 values (1, 2)"; //$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30127 Message:TEIID30127 INSERT
statement must have the same number of elements and values specified. This statement has
4 elements and 2 values."); //$NON-NLS-1$
+ helpResolveException(sql, "TEIID30127 INSERT statement must have the same
number of elements and values specified. This statement has 4 elements and 2
values."); //$NON-NLS-1$
}
@Test public void testInsertWithoutColumnsFails1() {
String sql = "Insert into pm1.g1 values (1, 2, 3, 4)"; //$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30082 Message:TEIID30082 Expected
value of type 'boolean' but '3' is of type 'integer' and no
implicit conversion is available."); //$NON-NLS-1$
+ helpResolveException(sql, "TEIID30082 Expected value of type
'boolean' but '3' is of type 'integer' and no implicit conversion
is available."); //$NON-NLS-1$
}
@Test public void testInsertWithQueryFails() {
String sql = "Insert into pm1.g1 select 1, 2, 3, 4"; //$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30128 Message:TEIID30128 Cannot
convert insert query expression projected symbol '3' of type java.lang.Integer to
insert column 'pm1.g1.e3' of type java.lang.Boolean"); //$NON-NLS-1$
+ helpResolveException(sql, "TEIID30128 Cannot convert insert query expression
projected symbol '3' of type java.lang.Integer to insert column
'pm1.g1.e3' of type java.lang.Boolean"); //$NON-NLS-1$
}
@Test public void testInsertWithQueryImplicitWithColumns() {
@@ -2573,7 +2573,7 @@
@Test public void testInsertWithQueryImplicitWithoutColumns1() {
String sql = "Insert into #X select 1 as x, 2 as y, 3 as y";
//$NON-NLS-1$
- helpResolveException(sql, "Error Code:TEIID30091 Message:TEIID30091 Cannot
create group '#X' with multiple columns named 'y'"); //$NON-NLS-1$
+ helpResolveException(sql, "TEIID30091 Cannot create group '#X' with
multiple columns named 'y'"); //$NON-NLS-1$
}
@Test public void testInsertWithoutColumnsPasses() {
@@ -2612,7 +2612,7 @@
}
@Test public void testUniqeNamesWithInlineView() {
- helpResolveException("select * from (select count(intNum) a,
count(stringKey) b, bqt1.smalla.intkey as b from bqt1.smalla group by bqt1.smalla.intkey)
q1 order by q1.a", RealMetadataFactory.exampleBQTCached(), "Error
Code:TEIID30091 Message:TEIID30091 Cannot create group 'q1' with multiple columns
named 'b'"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select * from (select count(intNum) a,
count(stringKey) b, bqt1.smalla.intkey as b from bqt1.smalla group by bqt1.smalla.intkey)
q1 order by q1.a", RealMetadataFactory.exampleBQTCached(), "TEIID30091 Cannot
create group 'q1' with multiple columns named 'b'"); //$NON-NLS-1$
//$NON-NLS-2$
}
@Test public void testResolveOldProcRelational() {
@@ -2640,7 +2640,7 @@
@Test public void testCallableStatementTooManyParameters() throws Exception {
String sql = "{call pm4.spTest9(?, ?)}"; //$NON-NLS-1$
- TestResolver.helpResolveException(sql, RealMetadataFactory.exampleBQTCached(),
"Error Code:TEIID30142 Message:TEIID30142 Incorrect number of parameters specified on
the stored procedure pm4.spTest9 - expected 1 but got 2"); //$NON-NLS-1$
+ TestResolver.helpResolveException(sql, RealMetadataFactory.exampleBQTCached(),
"TEIID30142 Incorrect number of parameters specified on the stored procedure
pm4.spTest9 - expected 1 but got 2"); //$NON-NLS-1$
}
@Test public void testUpdateSetClauseReferenceType() {
@@ -2656,7 +2656,7 @@
@Test public void testNoTypeCriteria() {
String sql = "select * from pm1.g1 where ? = ?"; //$NON-NLS-1$
- helpResolveException(sql, RealMetadataFactory.example1Cached(), "Error
Code:TEIID30083 Message:TEIID30083 Expression '? = ?' has a parameter with
non-determinable type information. The use of an explicit convert may be
necessary."); //$NON-NLS-1$
+ helpResolveException(sql, RealMetadataFactory.example1Cached(), "TEIID30083
Expression '? = ?' has a parameter with non-determinable type information. The
use of an explicit convert may be necessary."); //$NON-NLS-1$
}
@Test public void testReferenceInSelect() {
@@ -2710,7 +2710,7 @@
// ambiguous, should fail
@Test public void testOrderBy_J658d() {
- helpResolveException("SELECT pm1.g1.e1, e2 as x, e3 as x FROM pm1.g1 ORDER
BY x, e1 ", "Error Code:TEIID30084 Message:TEIID30084 Element 'x' in
ORDER BY is ambiguous and may refer to more than one element of SELECT clause.");
//$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1, e2 as x, e3 as x FROM pm1.g1 ORDER
BY x, e1 ", "TEIID30084 Element 'x' in ORDER BY is ambiguous and may
refer to more than one element of SELECT clause."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testOrderBy_J658e() {
Query resolvedQuery = (Query) helpResolve("SELECT pm1.g1.e1, e2 as x, e3 as
e2 FROM pm1.g1 ORDER BY x, e2 "); //$NON-NLS-1$
@@ -2829,7 +2829,7 @@
}
@Test public void testOrderByExpression2() {
- helpResolveException("select pm1.g1.e1 from pm1.g1 union select pm1.g2.e1 from
pm1.g2 order by pm1.g1.e1 || 2", "Error Code:TEIID30086 Message:TEIID30086 ORDER
BY expression '(pm1.g1.e1 || 2)' cannot be used with a set query.");
//$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select pm1.g1.e1 from pm1.g1 union select pm1.g2.e1 from
pm1.g2 order by pm1.g1.e1 || 2", "TEIID30086 ORDER BY expression '(pm1.g1.e1
|| 2)' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testOrderByConstantFails() {
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestXMLResolver.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -404,7 +404,7 @@
}
@Test public void testXMLWithSelect1a() {
- helpResolveException("select 'a' from xmltest.doc1 where node1 =
'yyz'", "Error Code:TEIID30134 Message:TEIID30134 Expressions cannot be
selected by XML Queries"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("select 'a' from xmltest.doc1 where node1 =
'yyz'", "TEIID30134 Expressions cannot be selected by XML
Queries"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testXMLWithSelect2() {
Modified: trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -883,7 +883,7 @@
fail("Expected QueryValidatorException due to divide by 0");
//$NON-NLS-1$
} catch(TeiidException e) {
// looks like message is being wrapped with another exception with same message
- assertEquals("Error Code:TEIID30328 Message:TEIID30328 Unable to
evaluate (5 / 0): Error Code:TEIID30384 Message:TEIID30384 Error while evaluating function
/", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30328 Unable to evaluate (5 / 0): TEIID30384 Error
while evaluating function /", e.getMessage()); //$NON-NLS-1$
}
}
@@ -896,7 +896,7 @@
QueryRewriter.rewriteCriteria(origCrit, null, metadata);
fail("Expected QueryValidatorException due to invalid string");
//$NON-NLS-1$
} catch(TeiidException e) {
- assertEquals("Error Code:TEIID30328 Message:TEIID30328 Unable to
evaluate convert('x', integer): Error Code:TEIID30384 Message:TEIID30384 Error
while evaluating function convert", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30328 Unable to evaluate convert('x',
integer): TEIID30384 Error while evaluating function convert", e.getMessage());
//$NON-NLS-1$
}
}
@@ -1118,7 +1118,7 @@
getRewritenProcedure(procedure, userQuery, Table.TriggerEvent.INSERT);
fail("exception expected"); //$NON-NLS-1$
} catch (QueryValidatorException e) {
- assertEquals("Error Code:TEIID30367 Message:TEIID30367 Infinite loop
detected, procedure will not be executed.", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID30367 Infinite loop detected, procedure will not be
executed.", e.getMessage()); //$NON-NLS-1$
}
}
Modified: trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java
===================================================================
--- trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java 2012-05-24
19:29:03 UTC (rev 4143)
+++ trunk/runtime/src/test/java/org/teiid/transport/TestSocketRemoting.java 2012-05-25
15:11:25 UTC (rev 4144)
@@ -118,11 +118,11 @@
}
@Override
- public void send(Message message, ResultsReceiver<Object> listener,
+ public void send(Message message, ResultsReceiver<Object> l,
Serializable messageKey) throws CommunicationException,
InterruptedException {
ServerWorkItem workItem = new ServerWorkItem(this, messageKey, message, server);
- this.listener = listener;
+ this.listener = l;
workItem.run();
}
@@ -154,7 +154,7 @@
createFakeConnection(serverInstance);
fail("expected exception"); //$NON-NLS-1$
} catch (CommunicationException e) {
- assertEquals("Error Code:TEIID20018 Message:TEIID20018 Unable to find a component
used authenticate on to Teiid", e.getMessage()); //$NON-NLS-1$
+ assertEquals("TEIID20018 Unable to find a component used authenticate on to
Teiid", e.getMessage()); //$NON-NLS-1$
}
}