From 3936c03f1e5100fadd38f822746a5086df262f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Thu, 2 Jan 2025 09:28:47 +0100 Subject: [PATCH] remove obsolete COPAC --- build.gradle | 3 --- z3950-common/build.gradle | 4 ++-- .../{COPACTest.groovy => JiscTest.groovy} | 22 +++++++++++-------- .../org/xbib/z3950/groovy/LVITest.groovy | 18 ++++++++------- 4 files changed, 25 insertions(+), 22 deletions(-) rename z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/{COPACTest.groovy => JiscTest.groovy} (57%) diff --git a/build.gradle b/build.gradle index 1cb1d82..bfd3bcc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,8 @@ plugins { - id "pmd" id 'maven-publish' id 'signing' id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1" - //id "com.github.spotbugs" version "6.0.0-beta.3" id "org.cyclonedx.bom" version "1.7.4" id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0" } @@ -34,7 +32,6 @@ subprojects { apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/test/junit5.gradle') apply from: rootProject.file('gradle/documentation/asciidoc.gradle') - apply from: rootProject.file('gradle/quality/pmd.gradle') apply from: rootProject.file('gradle/publish/maven.gradle') } apply from: rootProject.file('gradle/publish/sonatype.gradle') diff --git a/z3950-common/build.gradle b/z3950-common/build.gradle index 2a8af6d..05c5715 100644 --- a/z3950-common/build.gradle +++ b/z3950-common/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'org.xbib.gradle.plugin.jflex' version '3.0.2' - id 'org.xbib.gradle.plugin.jacc' version '3.0.2' + id 'org.xbib.gradle.plugin.jflex' version '3.1.0' + id 'org.xbib.gradle.plugin.jacc' version '3.1.0' } dependencies { diff --git a/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/COPACTest.groovy b/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/JiscTest.groovy similarity index 57% rename from z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/COPACTest.groovy rename to z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/JiscTest.groovy index 462fe94..7c982da 100644 --- a/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/COPACTest.groovy +++ b/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/JiscTest.groovy @@ -1,19 +1,21 @@ package org.xbib.z3950.groovy import groovy.util.logging.Log +import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import org.xbib.z3950.client.jdk.JDKZClient import java.util.logging.Level @Log -class COPACTest { +class JiscTest { + @Disabled @Test void testCOPAC() { - String host = "z3950.copac.ac.uk" + String host = "z3950.libraryhub.jisc.ac.uk" int port = 210 - String database = "COPAC" + String database = "NBK" String query = "@attr 1=1 smith" // "1.2.840.10003.5.10"; // MARC String preferredRecordSyntax = "xml" // "1.2.840.10003.5.109.10" // xml @@ -25,11 +27,13 @@ class COPACTest { .setDatabases(Collections.singletonList(database)) .setPreferredRecordSyntax(preferredRecordSyntax) .build() - client.withCloseable {cl -> - cl.searchPQF(query, from, length, - (status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total), - record -> log.log(Level.INFO, "found record " + record), // MODS - () -> log.log(Level.WARNING, "timeout")) - } + client.searchPQF(query, + from, + length, + null, + (status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total), + record -> log.log(Level.INFO, "found record " + record), // MODS + () -> log.log(Level.WARNING, "timeout")) + client.close() } } diff --git a/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/LVITest.groovy b/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/LVITest.groovy index 2b1bfe6..33eda65 100644 --- a/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/LVITest.groovy +++ b/z3950-groovy/src/test/groovy/org/xbib/z3950/groovy/LVITest.groovy @@ -14,8 +14,8 @@ class LVITest { @Test void testLVI() { - String host = "localhost" - int port = 1210 + String host = "sru.hbz-nrw.de" + int port = 210 String database = "lvi" //String query = "@attr 1=1 Schmidt" // OK! //String query = "@attr 1=1 \"Schmidt, Heiner\"" // OK! @@ -41,12 +41,14 @@ class LVITest { .setPreferredRecordSyntax(preferredRecordSyntax) .setElementSetName("F") .build() - client.withCloseable {cl -> - cl.searchPQF(query, from, size, - (status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total), - record -> dump(MarcRecord.from(record.asStream(), StandardCharsets.UTF_8)), - () -> log.log(Level.WARNING, "timeout")) - } + client.searchPQF(query, + from, + size, + null, + (status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total), + record -> dump(MarcRecord.from(record.asStream(), StandardCharsets.UTF_8)), + () -> log.log(Level.WARNING, "timeout")) + client.close() } static void dump(Iterable iterable) {