Examples of supported()


Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

            wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP_REPO_ID,
                MavenRepository.class));

        assertThat("Proxy1 should have ES", proxy1EntrySource.supported()); // we served prefix file
        assertThat("Proxy2 should have ES", proxy2EntrySource.supported()); // we served prefix file
        assertThat("Group should have ES", groupEntrySource.supported()); // both proxies have it

        // GROUP wl must have 4 entries: 1 from hosted (/com/sonatype) + 3 from proxied prefix file
        final List<String> groupEntries = groupEntrySource.readEntries();
        assertThat(groupEntries.size(), equalTo(4));
        assertThat(groupEntries, hasItem("/com/sonatype"));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

            wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP_REPO_ID,
                MavenRepository.class));

        assertThat("Proxy1 should have ES", proxy1EntrySource.supported()); // we served prefix file
        assertThat("Proxy2 should not have ES", !proxy2EntrySource.supported()); // we served invalid prefix file
        assertThat("Group should not have ES", !groupEntrySource.supported()); // both proxies have it

        final RoutingStatus status =
            wm.getStatusFor(getRepositoryRegistry().getRepositoryWithFacet(PROXY2_REPO_ID,
                MavenRepository.class));
        final String message = status.getDiscoveryStatus().getLastDiscoveryMessage();
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

              MavenProxyRepository.class));
      assertThat(result.getMessage(),
          equalTo("Remote publishes prefix file (is less than a day old), using it."));

      final PrefixSource entrySource = result.getPrefixSource();
      assertThat(entrySource.supported(), is(true));
      assertThat(entrySource.readEntries(), contains("/org/apache/maven", "/org/sonatype", "/eu/flatwhite"));
      assertThat(entrySource.readEntries().size(), equalTo(3));
    }
    finally {
      server.stop();
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

              MavenProxyRepository.class));
      assertThat(result.getMessage(),
          equalTo("Remote publishes prefix file (is less than a day old), using it."));

      final PrefixSource entrySource = result.getPrefixSource();
      assertThat(entrySource.supported(), is(true));
      assertThat(entrySource.readEntries(), contains("/org/apache/maven", "/org/sonatype", "/eu/flatwhite"));
      assertThat(entrySource.readEntries().size(), equalTo(3));
    }
    finally {
      server.stop();
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

      final StrategyResult result = subject.discover(mavenProxyRepository);
      assertThat(result.getMessage(),
          equalTo("Remote publishes prefix file (is less than a day old), using it."));

      final PrefixSource entrySource = result.getPrefixSource();
      assertThat(entrySource.supported(), is(true));
      assertThat(entrySource.readEntries(), contains("/org/apache/maven", "/org/sonatype", "/eu/flatwhite"));
      assertThat(entrySource.readEntries().size(), equalTo(3));
    }
    finally {
      server.stop();
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

                MavenRepository.class));

        assertThat("Hosted should have ES", hostedEntrySource.supported());
        assertThat("Proxy should not have ES", !proxyEntrySource.supported()); // as we serve noscrape prefix
        // file
        assertThat("Group cannot have ES", !groupEntrySource.supported()); // as proxy member does not have WL
      }
      finally {
        server.stop();
      }
    }
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.PrefixSource.supported()

            wm.getPrefixSourceFor(getRepositoryRegistry().getRepositoryWithFacet(GROUP_REPO_ID,
                MavenRepository.class));

        assertThat("Hosted should have ES", hostedEntrySource.supported());
        assertThat("Proxy should have ES", proxyEntrySource.supported()); // as we did serve file ok
        assertThat("Group should have ES", groupEntrySource.supported()); // as all member should have it

        // GROUP wl must have 4 entries: 1 from hosted (/com/sonatype) + 3 from proxied prefix file
        final List<String> groupEntries = groupEntrySource.readEntries();
        assertThat(groupEntries.size(), equalTo(4));
        assertThat(groupEntries, hasItem("/com/sonatype"));
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.routing.internal.TextFilePrefixSourceMarshaller.Result.supported()

      item = retrieveFromRemoteIfExists(mavenProxyRepository, path);
      if (item != null) {
        log.debug("Remote prefix on {} at path {} found!", mavenProxyRepository, path);
        long prefixFileAgeInDays = (System.currentTimeMillis() - item.getModified()) / 86400000L;
        Result unmarshalled = new TextFilePrefixSourceMarshaller(config).read(item);
        if (!unmarshalled.supported()) {
          return new StrategyResult("Remote disabled automatic routing", UNSUPPORTED_PREFIXSOURCE, false);
        }
        if (unmarshalled.entries().isEmpty()) {
          return new StrategyResult("Remote publishes empty prefix file", UNSUPPORTED_PREFIXSOURCE, false);
        }
View Full Code Here

Examples of org.voltdb.catalog.CatalogDiffEngine.supported()

            // catalogs only move forward
            retval.expectedCatalogVersion = context.catalog.getCatalogVersion();

            // compute the diff in StringBuilder
            CatalogDiffEngine diff = new CatalogDiffEngine(context.catalog, newCatalog);
            if (!diff.supported()) {
                throw new Exception("The requested catalog change is not a supported change at this time. " + diff.errors());
            }

            // since diff commands can be stupidly big, compress them here
            retval.encodedDiffCommands = Encoder.compressAndBase64Encode(diff.commands());
View Full Code Here

Examples of org.voltdb.catalog.CatalogDiffEngine.supported()

            // catalogs only move forward
            retval.expectedCatalogVersion = context.catalogVersion;

            // compute the diff in StringBuilder
            CatalogDiffEngine diff = new CatalogDiffEngine(context.catalog, newCatalog);
            if (!diff.supported()) {
                retval.errorMsg = "The requested catalog change(s) are not supported:\n" + diff.errors();
                return retval;
            }

            // since diff commands can be stupidly big, compress them here
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.