Hi,
Apparently there is a warning "You did not close the PDF Document" on the
console when opening a PDF document using WebTest. I get this both if the test
fails and if it passes:
In my WebTest I used '<invoke url="#{PDF-path}"/>' to open a PDF-file and got
this on the console:
================
...<snip>
DEBUG (com.canoo.webtest.steps.Step) - Completed Step: steps (55/54)
DEBUG (com.canoo.webtest.steps.Step) - Step didn't produce results, no need to
notifying listeners
DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful Step: steps (55/54)
DEBUG (com.canoo.webtest.reporting.StepExecutionListener) -
fPreviousCurrentResponse: com.gargoylesoftware.htmlunit.textp...@ffa9d8
DEBUG (com.canoo.webtest.reporting.StepExecutionListener) -
fContext.getCurrentResponse(): com.gargoylesoftware.htmlunit.textp...@ffa9d8
DEBUG (com.canoo.webtest.reporting.StepExecutionListener) - isWorthSaving:
false, false
DEBUG (com.gargoylesoftware.htmlunit.WebWindowImpl) - destroyChildren
INFO (com.canoo.webtest.ant.WebtestTask) - Finished executing webtest
"Verify_XY" (C:\webtest_project\tests\Verify_BlaBla_.xml:32: )
DEBUG (com.canoo.webtest.ant.WebtestTask) - Writing test report using Report
class: com.canoo.webtest.reporting.XmlReporter
INFO (com.canoo.webtest.reporting.XmlReporter) - Writing report to
C:\webtest_project\results\qc\nightly\001_Verify_XY\WebTestReport.xml
java.lang.Throwable: Warning: You did not close the PDF Document
at org.pdfbox.cos.COSDocument.finalize(COSDocument.java:418)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
at java.lang.ref.Finalizer.access$100(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully created.
DEBUG (com.canoo.webtest.ant.WebtestTask) - Report written
DEBUG (com.canoo.webtest.reporting.HTMLReportGenerator) - Adding task for
C:\webtest_project\results\qc\nightly\001_Verify_XY\WebTestReport.xml: 553606
DEBUG (com.canoo.webtest.ant.WebtestTask) - Looking if it is needed to stop the
build
TestSuite:
wt.groovyTests:
[echo] Formatting
C:\webtest_project\results\qc\nightly\001_Verify_XY\WebTestReport.xml to HTML
in folder C:\webtest_project\results\qc\nightly\001_Verify_XY
[xslt] Processing
C:\webtest_project\results\qc\nightly\001_Verify_XY\WebTestReport.xml to
C:\webtest_project\results\qc\nightly\001_Verify_XY\WebTestReport.html
[xslt] Loading stylesheet C:\WebTest\resources\WebTestReport.xsl
java.lang.Throwable: Warning: You did not close the PDF Document
at org.pdfbox.cos.COSDocument.finalize(COSDocument.java:418)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
at java.lang.ref.Finalizer.access$100(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
wt.parallel.waitForCompletion:
wt.htmlReports:
[echo] Waiting for completion of background generation of single reports
...<snip>
============================
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Mark Salter
Sent: Donnerstag, 30. September 2010 12:10
To: [email protected]
Subject: Re: [Webtest] pdfbox cluttering /tmp
On 30/09/2010 09:47, Michael Zwick wrote:
> Thanks Mark for the hint.
You're welcome.
>
> I'm actually using WebTest, which apparently uses pdfbox. So the
> question is, could WebTest add a PDDocument.close() in its pdf steps
> (if not already used)? Or how could WebTest be improved such that the
> pdf*tmp files are cleaned up?
Oh I see, sorry.
>
> Should I open a ticket for that?
I have to think that would be a good idea.
I was also wondering if the pdfbox temp files are always left over, or
if it is failing or interrupted tests that give this result?
--
Mark
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest