FunkLoad icon indicating copy to clipboard operation
FunkLoad copied to clipboard

Configuration file has too many required values

Open nedbat opened this issue 13 years ago • 2 comments

If I create a .conf file with no title or description, I get an error:

No handlers could be found for logger "FunkLoad"
Traceback (most recent call last):
  File "/home/ned/mitx_all/python/bin/fl-run-bench", line 9, in <module>
    load_entry_point('funkload==1.16.1', 'console_scripts', 'fl-run-bench')()
  File "/home/ned/mitx_all/python/local/lib/python2.7/site-packages/funkload/BenchRunner.py", line 715, in main
    bench = BenchRunner(args[0], klass, method, options)
  File "/home/ned/mitx_all/python/local/lib/python2.7/site-packages/funkload/BenchRunner.py", line 224, in __init__
    self.class_title = test.conf_get('main', 'title')
  File "/home/ned/mitx_all/python/local/lib/python2.7/site-packages/funkload/FunkLoadTestCase.py", line 667, in conf_get
    val = self._config.get(section, key)
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'title' in section: 'main'

Why do I need a title or a description?

Similarly, many other parameters are required which could have reasonable defaults:

startup_delay = 0.01
cycle_time = 1
sleep_time = 0.01
sleep_time_min = 0
sleep_time_max = 0.5
log_to = 
log_path = load.log
result_path = load.xml

I'd be glad to write a patch if you're open to changing this.

nedbat avatar Oct 16 '12 17:10 nedbat

It is always good to have some test title and description but I am ok to not make them mandatory.

bdelbosc avatar Oct 16 '12 17:10 bdelbosc

oups wrong commit comment

bdelbosc avatar Nov 06 '12 11:11 bdelbosc