Git Product home page Git Product logo

Comments (6)

YasuhiroFuruta avatar YasuhiroFuruta commented on April 27, 2024

testLocalPrintNotOwner() fails to create the 2nd ChromeDriver object because the 2nd Chrome window has been opened.

It seems User2RegistrationAttempt() does not close the 2nd Chrome window when this test case cannot register the printer (test result is 'Blocked').
User2RegistrationAttempt() should close the 2nd Chrome window always.

from cloudprint_logocert.

kdlucas avatar kdlucas commented on April 27, 2024

I wonder if this is something Windows specific? I wonder why it's trying to
move the cache on Chrome. It looks like it tries to close Chrome in line
2065.

Kelly
kdLucas

On Wed, Jul 27, 2016 at 1:48 AM, YasuhiroFuruta [email protected]
wrote:

testLocalPrintNotOwner() fails to create the 2nd ChromeDriver object
because the 2nd Chrome window has been opened.

It seems User2RegistrationAttempt() does not close the 2nd Chrome window
when this test case cannot register the printer (test result is 'Blocked').
User2RegistrationAttempt() should close the 2nd Chrome window always.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#54 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADk_fdYPyi0R8s57NSPtZvLtkX9r9pW_ks5qZxtlgaJpZM4JV5iv
.

from cloudprint_logocert.

YasuhiroFuruta avatar YasuhiroFuruta commented on April 27, 2024

This error occurs because two Chrome instances using the same profile folder.
So it's not Windows specific.

When Chrome browser is starting up, it move a GPU cache folder, to delete the folder background.
https://chromium.googlesource.com/chromium/src/net/+/master/disk_cache/cache_util.cc

Line 2065 in 'testcert.py' is unexecuted yet, because this error occurs at the line 2050.

User2RegistrationAttempt() does not close the 2nd Chrome, if chrome2.RegisterPrinter() returns False.
The 2nd chrome remains and it triggers this error when testLocalPrintNotOwner() is executed.

    if chrome2.RegisterPrinter(self.printer):
      registered = chrome2.ConfirmPrinterRegistration(self.printer)
      try:
        self.assertFalse(registered)
      except AssertionError:
        notes = 'A simultaneous registration request registered a printer!'
        self.LogTest(test_id, test_name, 'Failed', notes)
        raise
      else:
        notes = 'Simultaneous registration request was not successful.'
        self.LogTest(test_id, test_name, 'Passed', notes)
      finally:
        cd2.CloseChrome()
    else:
      notes = 'Error attempting to register printer by %s' % (
          Constants.USER2['EMAIL'])
      self.LogTest(test_id, test_name, 'Blocked', notes)

from cloudprint_logocert.

kdlucas avatar kdlucas commented on April 27, 2024

It should actually be USER2's profile, not the same as USER. As long as USER2 is set up then cd2 should be another instance of Chrome using another profile. They should be using different directories for each profile (USER and USER2).

from cloudprint_logocert.

YasuhiroFuruta avatar YasuhiroFuruta commented on April 27, 2024

User2RegistrationAttempt() opens Chrome using USER2's profile, and it does not close this Chrome window on some cases.
After that, testLocalPrintNotOwner() opens Chrome using USER2's profile too, and this error occurs.

(Of course, Chrome using USER1's profile is opened apart from that.)

  def User2RegistrationAttempt(self):
    """Verify multiple registration attempts are not allowed by device."""
    test_id = '923ee7f2-c337-49d4-aa4d-8f8e3b43621a'
    test_name = 'testMultipleRegistrationAttempt'
    data_dir = Constants.USER2['EMAIL'].split('@')[0]
    cd2 = _chromedriver.ChromeDriver(logger, data_dir, self.loadtime)
  def testLocalPrintNotOwner(self):
    """Verify local print available to non owner of printer."""
    test_id = 'ea9b1e01-f792-4627-bf84-2db5db513da4'
    test_name = 'testLocalPrintNotOwner'
    data_dir = Constants.USER2['EMAIL'].split('@')[0]
    cd2 = _chromedriver.ChromeDriver(logger, data_dir, self.loadtime)

from cloudprint_logocert.

kdlucas avatar kdlucas commented on April 27, 2024

That's the issue, if the Chrome window does not get closed. I think we need
to figure out how to ensure the Chrome Window gets closed for all previous
tests.

Kelly
kdLucas

On Thu, Jul 28, 2016 at 7:12 PM, YasuhiroFuruta [email protected]
wrote:

User2RegistrationAttempt() opens Chrome using USER2's profile, and it does
not close this Chrome window on some cases.
After that, testLocalPrintNotOwner() opens Chrome using USER2's profile
too, and this error occurs.

(Of course, Chrome using USER1's profile is opened apart from that.)

def User2RegistrationAttempt(self):
"""Verify multiple registration attempts are not allowed by device."""
test_id = '923ee7f2-c337-49d4-aa4d-8f8e3b43621a'
test_name = 'testMultipleRegistrationAttempt'
data_dir = Constants.USER2['EMAIL'].split('@')[0]
cd2 = _chromedriver.ChromeDriver(logger, data_dir, self.loadtime)

def testLocalPrintNotOwner(self):
"""Verify local print available to non owner of printer."""
test_id = 'ea9b1e01-f792-4627-bf84-2db5db513da4'
test_name = 'testLocalPrintNotOwner'
data_dir = Constants.USER2['EMAIL'].split('@')[0]
cd2 = _chromedriver.ChromeDriver(logger, data_dir, self.loadtime)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#54 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADk_fdu21rEGsD-FLtDovMP3OKrJufcHks5qaWGWgaJpZM4JV5iv
.

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.