@Test public void checkConstructorMap() { List<Class<?>> types = Arrays.asList( Byte.class, Integer.class, Long.class, Boolean.class, Double.class, Float.class, String.class, Layout.class, DataRank.class, CheckpointEntryType.class, UUID.class, byte[].class, ByteBuf.class ); assertThat(ICorfuPayload.constructorMap.keySet()).containsAll(types); }
public HostAssert hasWorkload(String... workloads) { assertThat(actual.getDseWorkloads()).isNotNull().containsAll(Arrays.asList(workloads)); return this; }
@Test public void getHeaderNames_delegates_to_responseInfo() { // given String headerKey1 = UUID.randomUUID().toString(); String headerKey2 = UUID.randomUUID().toString(); headers.set(headerKey1, UUID.randomUUID().toString()); headers.set(headerKey2, UUID.randomUUID().toString()); // when Collection<String> result = wrapper.getHeaderNames(); // then assertThat(result).containsAll(headers.names()); assertThat(headers.names()).hasSize(2); }
/** * Validates that when using the default load balancing policy that if you make a query with the * default traversal source that {@link com.datastax.driver.dse.DseLoadBalancingPolicy} does not * target the spark master as the primary query source. * * @test_category dse:graph * @jira_ticket JAVA-1098 */ @Test(groups = "long") public void should_not_target_analytics_node_with_default_source() { assertThat(executeOLAPQuery(10, "default")).containsAll(cluster().getMetadata().getAllHosts()); }
/** * Validates that when using the default load balancing policy that if you make a query without * providing a traversal source that {@link com.datastax.driver.dse.DseLoadBalancingPolicy} does * not target the spark master as the primary query source. * * @test_category dse:graph * @jira_ticket JAVA-1098 */ @Test(groups = "long") public void should_not_target_analytics_node_by_default() { assertThat(executeOLAPQuery(10, null)).containsAll(cluster().getMetadata().getAllHosts()); } }
@Test(dependsOnMethods = "testGetVirtualGuestFiltered") public void testSetTagsOnVirtualGuest() throws Exception { ImmutableSet<String> tags = ImmutableSet.of("test", "jclouds"); assertTrue(virtualGuestApi.setTags(virtualGuest.getId(), tags)); VirtualGuest found = virtualGuestApi.getVirtualGuest(virtualGuest.getId()); Set<TagReference> tagReferences = found.getTagReferences(); assertNotNull(tagReferences); ImmutableSet.Builder<String> actualTagsBuilder = ImmutableSet.builder(); for (TagReference ref : tagReferences) { actualTagsBuilder.add(ref.getTag().getName()); } Set<String> actualTags = actualTagsBuilder.build(); assertThat(actualTags).containsAll(tags); }