Git Product home page Git Product logo

Comments (7)

kdlucas avatar kdlucas commented on April 27, 2024

For testLocalDiscoveryToggle, the assumption is that the listener will not discover any mdns announcements once Local Discovery is turned off. I see there was a change from using self.browser to mdns_browser a couple of months ago. I wonder if that could have affected this test.

Could you do me a favor and compare the source code of the old and new LogoCert Tool and see if there are any differences that look like they might have affected these two tests?

from cloudprint_logocert.

YYWeave avatar YYWeave commented on April 27, 2024

I have compared the source code of the old and new LogoCert Tool.
Here is the difference of the _mdns.py file which might be the reason why these two issues occurs.

Old Tool

def add_service(self, zeroconf, type, name):
self.logger.info("Service added: '%s' (type is %s)", name, type)
self.discovered[name] = True

New Tool

def add_service(self, zeroconf, service_type, name):
self.logger.info('Service added: "%s" (type is %s)', name, service_type)
self.discovered[name] = {}
self.discovered[name]['proto'] = service_type
self.discovered[name]['found'] = True

I think there is something wrong with the testcert.py of the new tool in line 1841 and line 1929(code is same as line 1841).
So I tried to modify the source as below.
before: self.assertFalse(mdns_browser.listener.discovered[k])
after : self.assertFalse(mdns_browser.listener.discovered[k]['found'])
It should be also necessary to remove the code of line 1818 where compile error would be happened here. I commented it.
With the two modifications, fortunately the two test results changed to "Passed".
Please confirm if my modifications are right.

There is a new issue I want to confirm which occurs just because the order of the tests in my opinion.
When I run testLocalDiscoveryToggle and testPrinterOffSendGoodbyePacket separately, there is no problem. But after running testPrinterIdleNoBroadcastPrivet, both of testLocalDiscoveryToggle and testPrinterOffSendGoodbyePacket will be failed.
It seems like the execution of testPrinterIdleNoBroadcastPrivet would affect the following test.

from cloudprint_logocert.

kdlucas avatar kdlucas commented on April 27, 2024

Yes, looks like your logic might be correct. I'll take a look at the source
code this week and get a change submitted.

Kelly
kdLucas

On Fri, Apr 1, 2016 at 3:30 AM, YYWeave [email protected] wrote:

I have compared the source code of the old and new LogoCert Tool.
Here is the difference of the _mdns.py file which might be the reason why
these two issues occurs.
Old Tool

def add_service(self, zeroconf, type, name):
self.logger.info("Service added: '%s' (type is %s)", name, type)
self.discovered[name] = True
New Tool

def add_service(self, zeroconf, service_type, name):
self.logger.info('Service added: "%s" (type is %s)', name, service_type)
self.discovered[name] = {}
self.discovered[name]['proto'] = service_type
self.discovered[name]['found'] = True

I think there is something wrong with the testcert.py of the new tool in
line 1841 and line 1929(code is same as line 1841).
So I tried to modify the source as below.
before: self.assertFalse(mdns_browser.listener.discovered[k])
after : self.assertFalse(mdns_browser.listener.discovered[k]['found'])
It should be also necessary to remove the code of line 1818 where compile
error would be happened here. I commented it.
With the two modifications, fortunately the two test results changed to
"Passed".
Please confirm if my modifications are right.

There is a new issue I want to confirm which occurs just because the order
of the tests in my opinion.
When I run testLocalDiscoveryToggle and testPrinterOffSendGoodbyePacket
separately, there is no problem. But after running
testPrinterIdleNoBroadcastPrivet, both of testLocalDiscoveryToggle and
testPrinterOffSendGoodbyePacket will be failed.
It seems like the execution of testPrinterIdleNoBroadcastPrivet would
affect the following test.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#21 (comment)

from cloudprint_logocert.

kdlucas avatar kdlucas commented on April 27, 2024

I made some changes, see if this fixes the issues.

I don't think the testPrinterIdleNoBroadcastPrivet should affect any tests,
as it's just listening to see if any Privet packets were advertised over a
given period of time.

Kelly
kdLucas

On Fri, Apr 1, 2016 at 3:30 AM, YYWeave [email protected] wrote:

I have compared the source code of the old and new LogoCert Tool.
Here is the difference of the _mdns.py file which might be the reason why
these two issues occurs.
Old Tool

def add_service(self, zeroconf, type, name):
self.logger.info("Service added: '%s' (type is %s)", name, type)
self.discovered[name] = True
New Tool

def add_service(self, zeroconf, service_type, name):
self.logger.info('Service added: "%s" (type is %s)', name, service_type)
self.discovered[name] = {}
self.discovered[name]['proto'] = service_type
self.discovered[name]['found'] = True

I think there is something wrong with the testcert.py of the new tool in
line 1841 and line 1929(code is same as line 1841).
So I tried to modify the source as below.
before: self.assertFalse(mdns_browser.listener.discovered[k])
after : self.assertFalse(mdns_browser.listener.discovered[k]['found'])
It should be also necessary to remove the code of line 1818 where compile
error would be happened here. I commented it.
With the two modifications, fortunately the two test results changed to
"Passed".
Please confirm if my modifications are right.

There is a new issue I want to confirm which occurs just because the order
of the tests in my opinion.
When I run testLocalDiscoveryToggle and testPrinterOffSendGoodbyePacket
separately, there is no problem. But after running
testPrinterIdleNoBroadcastPrivet, both of testLocalDiscoveryToggle and
testPrinterOffSendGoodbyePacket will be failed.
It seems like the execution of testPrinterIdleNoBroadcastPrivet would
affect the following test.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#21 (comment)

from cloudprint_logocert.

kdlucas avatar kdlucas commented on April 27, 2024

Please verify if the changes fixed this.

from cloudprint_logocert.

YYWeave avatar YYWeave commented on April 27, 2024

Only the issue of testLocalDiscoveryToggle was fixed.
I think the change in line1841 of testcert.py should be also modified in line1865, line1900 and line1929 as the same reason. I tried it and testPrinterOffSendGoodbyePacket was fixed.
Please confirm if I am right.

from cloudprint_logocert.

kdlucas avatar kdlucas commented on April 27, 2024

Ok, I've committed the changes, please verify the fix.

from cloudprint_logocert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.