netfengxia / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Serving a folder with an extension (i.e. hammer.js) causes "Impossible to read file" #419

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a folder to the 'serve' property that contains another folder such as 
'hammer.js', and make the serve something like "/path/to/folder/*.js" (for 
example, if you download hammer.js, put it in a folder called hammer.js).
2. Try to run the server

What is the expected output? What do you see instead?
I'd expect everything to run normally.

What version of the product are you using? On what operating system?
Windows 7, js-test-driver 1.3.5

Please provide any additional information below.

java.lang.RuntimeException: Impossible to read file: 
**path**to**folder**redacted**\requirejs\tests\paths\first.js
        at com.google.jstestdriver.SimpleFileReader.readFile(SimpleFileReader.java:50)
        at com.google.jstestdriver.FileInfo.loadFile(FileInfo.java:203)
        at com.google.jstestdriver.ProcessingFileLoader.loadFiles(ProcessingFileLoader.java:61)
        at com.google.jstestdriver.model.JstdTestCaseDelta.loadFiles(JstdTestCaseDelta.java:59)
        at com.google.jstestdriver.FileUploader.uploadToServer(FileUploader.java:218)
        at com.google.jstestdriver.action.UploadAction.run(UploadAction.java:39)
        at com.google.jstestdriver.ActionRunner.runActions(ActionRunner.java:81)
        at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfigurationWithFlags(JsTestDriverImpl.java:342)
        at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfiguration(JsTestDriverImpl.java:233)
        at com.google.jstestdriver.Main.main(Main.java:70)
Caused by: java.io.FileNotFoundException: 
**path**to**folder**redacted**\requirejs\tests\paths\first.js (Access is denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at com.google.jstestdriver.SimpleFileReader.readFile(SimpleFileReader.java:34)
        ... 9 more
java.lang.RuntimeException: Impossible to read file: 
**path**to**folder**redacted**\requirejs\tests\paths\first.js
        at com.google.jstestdriver.SimpleFileReader.readFile(SimpleFileReader.java:50)
        at com.google.jstestdriver.FileInfo.loadFile(FileInfo.java:203)
        at com.google.jstestdriver.ProcessingFileLoader.loadFiles(ProcessingFileLoader.java:61)
        at com.google.jstestdriver.model.JstdTestCaseDelta.loadFiles(JstdTestCaseDelta.java:59)
        at com.google.jstestdriver.FileUploader.uploadToServer(FileUploader.java:218)
        at com.google.jstestdriver.action.UploadAction.run(UploadAction.java:39)
        at com.google.jstestdriver.ActionRunner.runActions(ActionRunner.java:81)
        at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfigurationWithFlags(JsTestDriverImpl.java:342)
        at com.google.jstestdriver.embedded.JsTestDriverImpl.runConfiguration(JsTestDriverImpl.java:233)
        at com.google.jstestdriver.Main.main(Main.java:70)
Caused by: java.io.FileNotFoundException: 
**path**to**folder**redacted**\requirejs\tests\paths\first.js (Access is denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at com.google.jstestdriver.SimpleFileReader.readFile(SimpleFileReader.java:34)
        ... 9 more
Unexpected Runner Condition: Impossible to read file: 
**path**to**folder**redacted**\requirejs\tests\paths\first.js
 Use --runnerMode DEBUG for more information.

Original issue reported on code.google.com by stephenl...@gmail.com on 31 Jan 2013 at 12:48