Author: shawkins
Date: 2010-10-05 13:38:15 -0400 (Tue, 05 Oct 2010)
New Revision: 2628
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/SessionMetadataMapper.java
branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
Log:
TEIID-1290 fixing the mapping of session info
Modified:
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/SessionMetadataMapper.java
===================================================================
---
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/SessionMetadataMapper.java 2010-10-05
16:19:47 UTC (rev 2627)
+++
branches/7.1.x/client/src/main/java/org/teiid/adminapi/impl/SessionMetadataMapper.java 2010-10-05
17:38:15 UTC (rev 2628)
@@ -81,7 +81,7 @@
CompositeMetaType composite = (CompositeMetaType) metaType;
CompositeValueSupport session = new CompositeValueSupport(composite);
- session.set(APPLICATION_NAME, SimpleValueSupport.wrap(object.getName()));
+ session.set(APPLICATION_NAME, SimpleValueSupport.wrap(object.getApplicationName()));
session.set(CREATED_TIME, SimpleValueSupport.wrap(object.getCreatedTime()));
session.set(CLIENT_HOST_NAME, SimpleValueSupport.wrap(object.getClientHostName()));
session.set(IP_ADDRESS, SimpleValueSupport.wrap(object.getIPAddress()));
Modified:
branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java
===================================================================
---
branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java 2010-10-05
16:19:47 UTC (rev 2627)
+++
branches/7.1.x/client/src/test/java/org/teiid/adminapi/impl/TestSessionMetadata.java 2010-10-05
17:38:15 UTC (rev 2628)
@@ -33,13 +33,14 @@
@Test public void testMapping() {
SessionMetadata session = new SessionMetadata();
session.setSessionId("test");
-
+ session.setApplicationName("foo");
SessionMetadataMapper smm = new SessionMetadataMapper();
MetaValue mv = smm.createMetaValue(smm.getMetaType(), session);
SessionMetadata session1 = smm.unwrapMetaValue(mv);
assertEquals(session.getSessionId(), session1.getSessionId());
+ assertEquals(session.getApplicationName(), session1.getApplicationName());
}
}
Show replies by date