【Furion】执行的csv文件未找到

在furion平台启动性能测试任务时,20台肉鸡,每台肉鸡1000个并发线程,但是实际日志收集到到信息仅仅1000个线程,查看肉鸡的日志:

在这里插入图片描述

问题定位

  1. 查看对应路径的文件
    在这里插入图片描述
  2. 很明显该文件存在,打开文件,文件内容正常
    在这里插入图片描述
  3. 还是看看具体的报错信息吧,定位到具体的代码段信息
/**
     * Creates an association between a filename and a File inputOutputObject,
     * and stores it for later use - unless it is already stored.
     *
     * @param filename - relative (to base) or absolute file name (must not be null or empty)
     * @param charsetName - the character set encoding to use for the file (may be null)
     * @param alias - the name to be used to access the object (must not be null)
     * @param hasHeader true if the file has a header line describing the contents
     * @return the header line; may be null
     * @throws IllegalArgumentException if header could not be read or filename is null or empty
     */
    public synchronized String reserveFile(String filename, String charsetName, String alias, boolean hasHeader) {
        if (filename == null || filename.isEmpty()){
            throw new IllegalArgumentException("Filename must not be null or empty");
        }
        if (alias == null){
            throw new IllegalArgumentException("Alias must not be null");
        }
        FileEntry fileEntry = files.get(alias);
        if (fileEntry == null) {
            fileEntry = new FileEntry(resolveFileFromPath(filename), null, charsetName);
            if (filename.equals(alias)){
                log.info("Stored: {}", filename);
            } else {
                log.info("Stored: {} Alias: {}", filename, alias);
            }
            files.put(alias, fileEntry);
            if (hasHeader) {
                try {
                    fileEntry.headerLine = readLine(alias, false);
                    if (fileEntry.headerLine == null) {
                        fileEntry.exception = new EOFException("File is empty: " + fileEntry.file);
                    }
                } catch (IOException | IllegalArgumentException e) {
                    fileEntry.exception = e;
                }
            }
        }
        if (hasHeader && fileEntry.headerLine == null) {
            throw new IllegalArgumentException("Could not read file header line for file " + filename,
                    fileEntry.exception);
        }
        return fileEntry.headerLine;
    }

从代码中读取文件fileEntry.headerLine = readLine(alias, false); ,找不到文件时异常处理 fileEntry.exception = e; ,将异常赋值给fileEntry.exception
从代码上看问题出现在赋值这里,因为第一次读取这个文件异常后,后续即使有这个文件存在但仍会上抛这个异常导致

ps:在一开始的现象中,仅仅有一台肉鸡可以正常运行,因为第一次同步csv文件时仅仅同步给了那一台肉鸡且运行

解决方案

  1. 修改jmeter源码修复这个问题,去掉异常赋值等方式
  2. 从源码中可以看到 hasHeader 也是其中一个判断因素,在jmeter的脚本jmx文件中,可以将该属性配置为False
    在这里插入图片描述
    根据方案2修改后再次执行,果然解决问题
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sysu_lluozh

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值