Skip to content

Conversation

@the-t-in-rtf
Copy link
Collaborator

See GPII-2397 for details.

@amb26
Copy link
Member

amb26 commented Apr 26, 2017

Widespread failure in the case the log file is not present:

17:30:05.478:  FATAL ERROR: Uncaught exception: EPERM: operation not permitted, open 'C:\Users\Bosmon\AppData\Local\Temp\log.txt'
Error: EPERM: operation not permitted, open 'C:\Users\Bosmon\AppData\Local\Temp\log.txt'
    at Error (native)
17:30:05.480:  Current activity:
17:30:05.481:  jq: FAIL: Module "Testing persistence within a single restart..." Test name "Confirm that we have indexed records after adding one..." - Message:
 Unexpected failure in test case (see following log for more details): EPERM: operation not permitted, open 'C:\Users\Bosmon\AppData\Local\Temp\log.txt'
17:30:05.482:  jq: Source:     at kettle.test.handleUncaughtException (E:\source\gits\gpii-pouchdb\node_modules\kettle\lib\test\KettleTestUtils.js:31:15)
    at Object.fire (E:\source\gits\gpii-pouchdb\node_modules\infusion\src\framework\core\js\Fluid.js:1533:40)
    at process.onUncaughtException (E:\source\gits\gpii-pouchdb\node_modules\infusion\src\module\fluid.js:101:31)
    at emitOne (events.js:96:13)
    at process.emit (events.js:188:7)
    at process._fatalException (bootstrap_node.js:296:26)
17:30:05.485:  This database already has one or more records, no data will be loaded...
17:30:05.486:  Data loaded for database '_replicator'...
17:30:05.487:  This database already has one or more records, no data will be loaded...
17:30:05.487:  Data loaded for database 'persistence'...
17:30:05.488:  This database already has one or more records, no data will be loaded...
17:30:05.489:  Data loaded for database 'pouch__all_dbs__'...
17:30:05.497:  Sending a GET request to: /persistence/_design/persistence/_view/byId?startKey=%22new%22 on port 6798
17:30:05.540:  jq: Test concluded - Module "Testing persistence within a single restart..." Test name "Confirm that we have indexed records after adding one..."
: 2/3 passed - FAIL

…ue logs, to avoid cleanup errors when running "persistence" tests and improve test stability in general.

NOJIRA: Moved all configuration data to "in memory" (options) and removed the need for a config file.
@the-t-in-rtf
Copy link
Collaborator Author

the-t-in-rtf commented Apr 28, 2017

I was able to reproduce this locally. The latest error was the result of a long-running goof where I created log files one directory too high, something like /tmp/log.txt instead of /tmp/{component_id}/log.txt. Addressing this fixed everything but the persistence tests, which all run against the same directory. I ended up adding a function to ensure the log file name is also unique.

As part of investigating this, I discovered that all the required express-pouchdb options can now be configured directly using options passed when instantiating express-pouchdb. Previously, I had to save the options to a file and then pass options to load that file. I removed this workaround, which will reduce the amount of cleanup required as well.

@amb26, this is ready for review again.

@the-t-in-rtf
Copy link
Collaborator Author

The docs have been updated as well. I caught a few previously added options/features this go around.

@cindyli
Copy link
Member

cindyli commented Apr 28, 2017

The commits so far in the pull request help to solve the "out of memory" issue I encountered when using gpii-pouchdb version 1.0.1 as a node dependency for my universal data loader pull request.

In case someone is interested, here is the detail about the "out of memory" issue.

@amb26
Copy link
Member

amb26 commented May 1, 2017

The cleanup issues are again much improved and I think acceptable. The detritus left behind in /tmp in my system is now the following:

-rwx------+ 1 Bosmon None 838067 May  1 15:47 46C1.tmp
-rwx------+ 1 Bosmon None  25927 May  1 15:47 4C9C.tmp
-rwx------+ 1 Bosmon None  25909 May  1 15:47 4ECE.tmp
-rwx------+ 1 Bosmon None  26850 May  1 15:47 4EEE.tmp
drwx------+ 1 Bosmon None      0 May  1 15:47 scoped_dir_10928_24872

The "tmp" files seem to be pure binary, perhaps created by a browser process. The directory remains empty after running the pure node-based process

@amb26 amb26 merged commit 058ac5a into fluid-project:master May 1, 2017
@the-t-in-rtf
Copy link
Collaborator Author

I have created GPII-2400 to track the remaining cleanup work in gpii-testem.

@the-t-in-rtf the-t-in-rtf deleted the GPII-2397 branch May 2, 2017 07:10
@the-t-in-rtf the-t-in-rtf restored the GPII-2397 branch July 26, 2017 13:35
@the-t-in-rtf the-t-in-rtf deleted the GPII-2397 branch November 21, 2017 12:31
@the-t-in-rtf the-t-in-rtf restored the GPII-2397 branch January 25, 2018 11:20
@the-t-in-rtf the-t-in-rtf deleted the GPII-2397 branch January 25, 2018 11:21
@the-t-in-rtf the-t-in-rtf restored the GPII-2397 branch May 22, 2018 18:19
@the-t-in-rtf the-t-in-rtf deleted the GPII-2397 branch May 22, 2018 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants