geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [27/51] [abbrv] geode git commit: GEODE-2526: Enhance log statement to include ResourceTypeName
Date Tue, 07 Mar 2017 19:21:50 GMT
GEODE-2526: Enhance log statement to include ResourceTypeName

This closes #406


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/fb1fdf90
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/fb1fdf90
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/fb1fdf90

Branch: refs/heads/feature/GEM-1195
Commit: fb1fdf90198e4767114e32c53c9fc61ceb4c4645
Parents: 4fbc641
Author: Srikanth Manvi <srikanthmanvi@gmail.com>
Authored: Wed Feb 22 17:15:43 2017 -0500
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Feb 28 15:32:59 2017 -0800

----------------------------------------------------------------------
 .../org/apache/geode/internal/statistics/StatArchiveReader.java  | 4 ++--
 .../StatArchiveWithMissingResourceTypeRegressionTest.java        | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/fb1fdf90/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
index 9fba511..65e4370 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java
@@ -3230,8 +3230,8 @@ public class StatArchiveReader implements StatArchiveFormat {
       }
       ResourceType type = resourceTypeTable[resourceTypeId];
       if (type == null) {
-        throw new IllegalStateException(
-            "ResourceType is missing for resourceTypeId " + resourceTypeId);
+        throw new IllegalStateException("ResourceType is missing for resourceTypeId "
+            + resourceTypeId + ", resourceName " + name);
       }
       boolean loadInstance = loadInstance(name, id, resourceTypeTable[resourceTypeId]);
       resourceInstTable[resourceInstId] = new ResourceInst(this, resourceInstId, name, id,

http://git-wip-us.apache.org/repos/asf/geode/blob/fb1fdf90/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
index 73d6739..7a265d6 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java
@@ -59,7 +59,8 @@ public class StatArchiveWithMissingResourceTypeRegressionTest {
   public void throwsIllegalStateExceptionWithMessage() throws Exception {
     assertThatThrownBy(() -> new StatArchiveReader(new File[] {this.archiveFile}, null,
true))
         .isExactlyInstanceOf(IllegalStateException.class) // was NullPointerException
-        .hasMessage("ResourceType is missing for resourceTypeId 0"); // was null
+        .hasMessageStartingWith("ResourceType is missing for resourceTypeId 0")
+        .hasMessageContaining("resourceName statistics1");
   }
 
 }


Mime
View raw message