Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~/git/lobid-resources/src/test/resources/alma-fix$ bash updateAlmaTestFiles.sh all breaks #2016

Open
TobiasNx opened this issue May 29, 2024 · 2 comments
Assignees

Comments

@TobiasNx
Copy link
Contributor

~/git/lobid-resources/src/test/resources/alma-fix$ bash updateAlmaTestFiles.sh all
getting Alma Xml for 990001412590206441 ...
getting Alma Xml for 990011470300206441 ...
getting Alma Xml for 990014830510206441 ...
getting Alma Xml for 990016782920206441 ...
getting Alma Xml for 990021367710206441 ...
getting Alma Xml for 990021974470206441 ...
getting Alma Xml for 990026405480206441 ...
getting Alma Xml for 990030574430206441 ...
getting Alma Xml for 990033263300206441 ...
getting Alma Xml for 990035016180206441 ...
getting Alma Xml for 990041403870206441 ...
getting Alma Xml for 990050000600206441 ...
getting Alma Xml for 990051552280206441 ...
getting Alma Xml for 990051708340206441 ...
getting Alma Xml for 990052965140206441 ...
getting Alma Xml for 990053976760206441 ...
getting Alma Xml for 990054089950206441 ...
getting Alma Xml for 990054215550206441 ...
getting Alma Xml for 990054301770206441 ...
getting Alma Xml for 990054345550206441 ...
getting Alma Xml for 990055981810206441 ...
getting Alma Xml for 990058434730206441 ...
getting Alma Xml for 990058567920206441 ...
getting Alma Xml for 990059571560206441 ...
getting Alma Xml for 990063549080206441 ...
getting Alma Xml for 990065341720206441 ...
getting Alma Xml for 990075429930206441 ...
getting Alma Xml for 990075538650206441 ...
getting Alma Xml for 990103770440206441 ...
getting Alma Xml for 990103899140206441 ...
getting Alma Xml for 990104908070206441 ...
getting Alma Xml for 990108740950206441 ...
getting Alma Xml for 990108873860206441 ...
getting Alma Xml for 990108874370206441 ...
getting Alma Xml for 990109712970206441 ...
getting Alma Xml for 990110509950206441 ...
getting Alma Xml for 990110714900206441 ...
getting Alma Xml for 990110881770206441 ...
getting Alma Xml for 990112067120206441 ...
getting Alma Xml for 990113537330206441 ...
getting Alma Xml for 990114098170206441 ...
getting Alma Xml for 990114617880206441 ...
getting Alma Xml for 990118562160206441 ...
getting Alma Xml for 990119186660206441 ...
getting Alma Xml for 990122511970206441 ...
getting Alma Xml for 990123613330206441 ...
getting Alma Xml for 990124590390206441 ...
getting Alma Xml for 990126276700206441 ...
getting Alma Xml for 990133067580206441 ...
getting Alma Xml for 990136041660206441 ...
getting Alma Xml for 990139686910206441 ...
getting Alma Xml for 990141342350206441 ...
getting Alma Xml for 990143325070206441 ...
getting Alma Xml for 990150856900206441 ...
getting Alma Xml for 990156027740206441 ...
getting Alma Xml for 990156060190206441 ...
getting Alma Xml for 990166236770206441 ...
getting Alma Xml for 990167595410206441 ...
getting Alma Xml for 990170546170206441 ...
getting Alma Xml for 990171142550206441 ...
getting Alma Xml for 990172512030206441 ...
getting Alma Xml for 990173811970206441 ...
getting Alma Xml for 990181275760206441 ...
getting Alma Xml for 990182814750206441 ...
getting Alma Xml for 990183054020206441 ...
getting Alma Xml for 990183092590206441 ...
getting Alma Xml for 990183958380206441 ...
getting Alma Xml for 990184127410206441 ...
getting Alma Xml for 990185607520206441 ...
getting Alma Xml for 990185619180206441 ...
getting Alma Xml for 990189160110206441 ...
getting Alma Xml for 990190567380206441 ...
getting Alma Xml for 990193094010206441 ...
getting Alma Xml for 990193229450206441 ...
getting Alma Xml for 990193806600206441 ...
getting Alma Xml for 990194668760206441 ...
getting Alma Xml for 990194744870206441 ...
getting Alma Xml for 990196925330206441 ...
getting Alma Xml for 990197023370206441 ...
getting Alma Xml for 990197067610206441 ...
getting Alma Xml for 990197293880206441 ...
getting Alma Xml for 990198383780206441 ...
getting Alma Xml for 990199611280206441 ...
getting Alma Xml for 990202474680206441 ...
getting Alma Xml for 990204246530206441 ...
getting Alma Xml for 990204253490206441 ...
getting Alma Xml for 990206060640206441 ...
getting Alma Xml for 990207668220206441 ...
getting Alma Xml for 990207856340206441 ...
getting Alma Xml for 990209515320206441 ...
getting Alma Xml for 990209817770206441 ...
getting Alma Xml for 990210093550206441 ...
getting Alma Xml for 990210237770206441 ...
getting Alma Xml for 990210285400206441 ...
getting Alma Xml for 990210312460206441 ...
getting Alma Xml for 990210667610206441 ...
getting Alma Xml for 990210781980206441 ...
getting Alma Xml for 990210950050206441 ...
getting Alma Xml for 990213367870206441 ...
getting Alma Xml for 990213906490206441 ...
getting Alma Xml for 990217478660206441 ...
getting Alma Xml for 990217495840206441 ...
getting Alma Xml for 990218189790206441 ...
getting Alma Xml for 990219911120206441 ...
getting Alma Xml for 990220027540206441 ...
getting Alma Xml for 990223521400206441 ...
getting Alma Xml for 990225056670206441 ...
getting Alma Xml for 990226465800206441 ...
getting Alma Xml for 990226763120206441 ...
getting Alma Xml for 990363946050206441 ...
getting Alma Xml for 990365842280206441 ...
getting Alma Xml for 990366338340206441 ...
getting Alma Xml for 990366394400206441 ...
getting Alma Xml for 990366624790206441 ...
getting Alma Xml for 990367593690206441 ...
getting Alma Xml for 990367731740206441 ...
getting Alma Xml for 990367761810206441 ...
getting Alma Xml for 990368319120206441 ...
getting Alma Xml for 990368743120206441 ...
getting Alma Xml for 991002103529706485 ...
getting Alma Xml for 991005935279706485 ...
getting Alma Xml for 99370678063606441 ...
getting Alma Xml for 99370682219806441 ...
getting Alma Xml for 99370690532406441 ...
getting Alma Xml for 99370694196806441 ...
getting Alma Xml for 99370699582506441 ...
getting Alma Xml for 99370738710506441 ...
getting Alma Xml for 99370746459806441 ...
getting Alma Xml for 99370763433806441 ...
getting Alma Xml for 99370763882706441 ...
getting Alma Xml for 99370771475306441 ...
getting Alma Xml for 99370782520706441 ...
getting Alma Xml for 99370970534006441 ...
getting Alma Xml for 99371014448006441 ...
getting Alma Xml for 99371050452706441 ...
getting Alma Xml for 99371107766906441 ...
getting Alma Xml for 99371123630706441 ...
getting Alma Xml for 99371147104906441 ...
getting Alma Xml for 99371314897806441 ...
getting Alma Xml for 99371426239306441 ...
getting Alma Xml for 99371447897606441 ...
-:1: parser error : Document is empty

^
99371447897606441.xml.tmp:1: parser error : Document is empty

^
getting Alma Xml for 99371449208306441 ...
getting Alma Xml for 99371463467006441 ...
getting Alma Xml for 99371530278506441 ...
getting Alma Xml for 99371791018506441 ...
getting Alma Xml for 99371883990606441 ...
getting Alma Xml for 99371964653806441 ...
getting Alma Xml for 99371981001306441 ...
getting Alma Xml for 99372423490706441 ...
getting Alma Xml for 99372483173006441 ...
getting Alma Xml for 99372680948006441 ...
-:13: parser error : Opening and ending tag mismatch: link line 12 and head
</head>
       ^
-:55: parser error : Opening and ending tag mismatch: link line 11 and html
</html>
       ^
-:56: parser error : Premature end of data in tag link line 10

^
99372680948006441.xml.tmp:1: parser error : Document is empty

^
getting Alma Xml for 99373637266706441 ...
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< org.lobid:lobid-resources >----------------------
[INFO] Building lobid-resources 1.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-failsafe-plugin:3.0.0-M5:integration-test (default-cli) @ lobid-resources ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.lobid.resources.AlmaMarc21XmlToLobidJsonMetafixTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
org.metafacture.framework.MetafactureException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Vorzeitiges Dateiende.
        at org.metafacture.xml.XmlDecoder.process(XmlDecoder.java:79)
        at org.metafacture.xml.XmlDecoder.process(XmlDecoder.java:44)
        at org.metafacture.io.FileOpener.process(FileOpener.java:158)
        at org.metafacture.io.FileOpener.process(FileOpener.java:41)
        at org.metafacture.files.DirReader.dir(DirReader.java:99)
        at org.metafacture.files.DirReader.process(DirReader.java:75)
        at org.lobid.resources.AlmaMarc21XmlToLobidJsonMetafixTest.transformFile(AlmaMarc21XmlToLobidJsonMetafixTest.java:125)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:364)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:237)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:158)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
        at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Vorzeitiges Dateiende.
        at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1251)
        at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637)
        at org.metafacture.xml.XmlDecoder.process(XmlDecoder.java:73)
        ... 35 more
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 15.128 s <<< FAILURE! - in org.lobid.resources.AlmaMarc21XmlToLobidJsonMetafixTest
[ERROR] org.lobid.resources.AlmaMarc21XmlToLobidJsonMetafixTest.transformFile  Time elapsed: 14.999 s  <<< FAILURE!
java.lang.AssertionError
        at org.lobid.resources.AlmaMarc21XmlToLobidJsonMetafixTest.transformFile(AlmaMarc21XmlToLobidJsonMetafixTest.java:132)

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   AlmaMarc21XmlToLobidJsonMetafixTest.transformFile:132
[INFO] 
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  17.690 s
[INFO] Finished at: 2024-05-29T08:22:36+02:00
[INFO] ------------------------------------------------------------------------
@blackwinter
Copy link
Member

blackwinter commented May 29, 2024

The script seems to be overly optimistic. But data may change:

  • 99371447897606441 has been deleted (see response header x-status).
  • 99372680948006441 does not exist anymore (see response status 404).

@dr0i
Copy link
Member

dr0i commented Jun 10, 2024

It is as @blackwinter said.
I am against updating/removing the data blindly, as I've said before, because we may loose test coverage. This updating-script is just a little helper and should be used carefully, i.e. diff manually and decide whether to update/remove data or not.

@dr0i dr0i assigned TobiasNx and unassigned dr0i Jun 10, 2024
@dr0i dr0i removed the bug label Jun 10, 2024
@dr0i dr0i moved this from Ready to Review in lobid-resources Jun 10, 2024
TobiasNx added a commit that referenced this issue Jun 14, 2024
@dr0i dr0i moved this from Review to Backlog in lobid-resources Jun 14, 2024
TobiasNx added a commit that referenced this issue Nov 6, 2024
Due to wrong pathname 008 has overwritten correct publication dates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants