Hi Mikhail,
I have attached the test to i75848, hopefully the patches and tests
integrated well with the CWS. Thanks very much for your help during the
tasks, I'm eagerly looking forward to the next task.
Have a nice weekend. :-)
Best Regards,
Felix.
Mikhail Voitenko 写道:
Hi Felix,
I would say that the current state of the test is ok for integration,
it tests the main functionality. It could be extended in future. So
please attach the test to the related issue and I will integrate it
along with OLESimpleStorage reimplementation to the same cws as
TempFile reimplementation and tests.
I will send you the next task soon, I have to find it. :)
Thanks,
Mikhail.
Zhang Xiaofei wrote:
Hi Mikhail,
Thanks very much for your correction, I'm awfully sorry for the typo,
it would absolutely lead to potential error, I corrected it on my
machine and run the test again. Fortunately the rest part of the test
seems OK.
As for the test on the creation of storage from readonly stream, do
you think we add that part to the test now? If you think it should be
integrated in this CWS I will start working on it.
Best Regards,
Felix.
Mikhail Voitenko 写道:
Hi Felix,
The test looks good. There seems to be a small typo, the random
generator fills the wrong array.
If the storage is constructed with XInputStream the storage can be
changed but the commit() call might fail. From other side the stream
object is provided without type information. So in case the object
implements XStream, the storage will detect it and will use the
XStream interface, in this case the commit might work well.
In other words the storage can be always changed. During the commit
it will try to write to the provided stream, and if it is not
possible it will throw an exception.
By the way, the test uses input stream from the TempFile object. It
is sent to the storage as object, so that the type information is
lost. Since the TempFile object implements XStream interface, the
storage will find this interface on the provided object and will use
it. So to really test creation of the storage from readonly stream
it makes sense to use SimpleFileAccess and to open the readonly
stream using the URL of the TempFile.
Best Regards,
Mikhail.
Zhang Xiaofei wrote:
Hi Mikhail,
Thanks very much for your advice, I kind of confused the data
source and data sink, now I can get the right result from the test,
please review it and give me any suggestions on it. :-)
By the way, I still do not quite understand the service. Is a
storage, constructed with a XInputStream, any different from one
constructed with a XStream? Is the first one read only? If that is
the case, maybe it's better I modify the in-idl documentations a
little bit to make that clear.
Best Regards,
Felix.
Mikhail Voitenko 写道:
Hi Felix,
I have recognized that readBytes() and writeBytes() seem to be
used wrongly.
In general readBytes() reads from the stream to the provided
array, and writeBytes() writes to the stream from the provided
array.The streams are empty because they were not changed after
opening, readBytes() is used at the beginning instead of
writeBytes(). So to work as expected the test should first write
the data to the stream, and read it at the end of the test.
Best Regards,
Mikhail.
Zhang Xiaofei wrote:
Hi Mikhail,
Thanks for your help in our last IRC meeting, the exception is
eliminated, now I got another
com.sun.star.io.NotConnectedException in line 96, Test.java, when
the statement below is executed:
xTempStream[i].getOutputStream ().writeBytes (pBytesOut[i]);
I debugged the test and found the sub-streams had always been
zero-lengthed in the entire test, I could not find out why I got
this result, could you please give me some help on this?
Thanks and Best Regards,
Felix.
Zhang Xiaofei 写道:
Hi Mikhail,
The attachment is the unit test for OLESimpleStorage, right now
I have a problem running it: a java.lang.ClassCastException in
Test01.java, line 89, could you please help me on this? Thanks!
Best Regards,
Felix.
Mikhail Voitenko 写道:
Hi Felix,
Sorry, something seems to go wrong with the mail system. I did
not get this mail although I was in CC. Good that it was also
sent to dev@framework.openoffice.org
There seems to be no attachments to review, but we have
discussed the problems already. So since you have adjusted the
tests and they are executed as expected, it is ok to attach
them to the related issue I think. I will integrate them along
with the changes for TempFile service after the vacation.
The only documentation for the OleSimpleStorage service is the
idl-specification written by you :)
If you would like to see an example of service usage, please
take a look to the embeddedobj project, the service is used in
the following files: embeddedobj/source/msole/olepersist.cxx
embeddedobj/source/msole/ownview.cxx
Best Regards,
Mikhail.
Zhang Xiaofei wrote:
Hi Mikhail,
Sorry for the delay, I was tracking a bug all day long
yesterday and did not sent out the TempFile tests. I guess
this version is functionally OK now. Please check the
attachment to review them.
And now that I am to write the test for OleSimpleStorage,
could you recommend to me some references on it please? Any
example tests or documents on the service/interface could be
helpful to me.
Again, thanks very much for your help during the task. :-)
Best Regards,
Felix.
Mikhail Voitenko 写道:
Hi Felix,
Sorry for the delay with the answer.
I think that it will be enough to introduce only one test for
OleSimpleStorage based on the scenario that I have already
mentioned. Further tests will need additional .doc test files
integrated in the test, that is relative complex. So if you
want to introduce them, let do it after my vacation, so that
I can answer the questions.
Please prepare the test for OleSimpleStorage so we can
integrate it together with the service reimplementation. The
test suite can be extended in future.
By the way, how is it going with the TempFile tests? You was
going to send me the final version. If there are any
questions please do not hesitate to ask, so that I can answer
before the Friday ( my vacation starts on Friday ).
Thanks,
Mikhail.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]