< prev index next >

application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/subscription/AttributeValueTest.java

Print this page




  95                         assertTrue(results.size() > 0);
  96                         for (Object o : results.values()) {
  97                                 assertNotNull(o);
  98                         }
  99                 } catch (Exception e) {
 100                         fail(e.getMessage());
 101                 }
 102         }
 103 
 104         /**
 105          * Creates a fetchMap for getting a few attributes (CLASS_LOADING and OS)
 106          *
 107          * @return
 108          */
 109         private static List<MRI> createAttributesList(IConnectionHandle connectionHandle) throws IOException {
 110                 return Arrays.asList(RJMXConnectionTest.getOSAttributes());
 111         }
 112 
 113         private static List<MRI> createCommonAttributesList(IConnectionHandle connectionHandle) {
 114                 List<MRI> fetchList = new ArrayList<>();
 115                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "SystemCpuLoad")); //$NON-NLS-1$ //$NON-NLS-2$
 116                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "ProcessCpuLoad")); //$NON-NLS-1$ //$NON-NLS-2$
 117                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", //$NON-NLS-1$
 118                                 "TotalPhysicalMemorySize")); //$NON-NLS-1$
 119                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", //$NON-NLS-1$
 120                                 "UsedPhysicalMemorySize")); //$NON-NLS-1$
 121                 return fetchList;
 122         }
 123 }


  95                         assertTrue(results.size() > 0);
  96                         for (Object o : results.values()) {
  97                                 assertNotNull(o);
  98                         }
  99                 } catch (Exception e) {
 100                         fail(e.getMessage());
 101                 }
 102         }
 103 
 104         /**
 105          * Creates a fetchMap for getting a few attributes (CLASS_LOADING and OS)
 106          *
 107          * @return
 108          */
 109         private static List<MRI> createAttributesList(IConnectionHandle connectionHandle) throws IOException {
 110                 return Arrays.asList(RJMXConnectionTest.getOSAttributes());
 111         }
 112 
 113         private static List<MRI> createCommonAttributesList(IConnectionHandle connectionHandle) {
 114                 List<MRI> fetchList = new ArrayList<>();
 115                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "SystemCpuLoad"));
 116                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "ProcessCpuLoad"));
 117                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem",
 118                                 "TotalPhysicalMemorySize"));
 119                 fetchList.add(new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem",
 120                                 "UsedPhysicalMemorySize"));
 121                 return fetchList;
 122         }
 123 }
< prev index next >