小编cri*_*nge的帖子

在每次启动 ApacheDS 时导入架构 LDIF 和内容 LDIF?

我希望我的嵌入式 ApacheDS 在运行测试时以新的模式/内容启动。我尝试使用以下行导入 LDIF:

    LdifFileLoader ldifLoader = new LdifFileLoader(service.getAdminSession(), "path/to/my/export.ldif");
    ldifLoader.execute();
Run Code Online (Sandbox Code Playgroud)

但是现在 ApacheDS 将信息存储在当前工作目录中的目录server-work中。我每次都必须手动删除目录服务器工作,我想知道这是否是正确的方法......

我也将架构导出为 LDIF,我想先导入它。我也可以用LdifFileLoader导入它吗?还是我做错了?

java schema ldap ldif apacheds

4
推荐指数
1
解决办法
3901
查看次数

编写网络相关类的单元测试

我有一个负责网络通信的课程.我想对它进行单元测试.

这是我为了为它编写测试而陷入困境的地方我必须实现与之通信的服务器,但这又需要自己的测试.

你如何为这样的课程编写测试?

java networking junit unit-testing

3
推荐指数
1
解决办法
1316
查看次数

动态变化端点骆驼

是否有可能以动态方式从端点更改?例如,我想要改变

for(endpointFirst).routeId(ROUTEID).to(finishEndpoint);
Run Code Online (Sandbox Code Playgroud)

for(endpointSecond).routeId(ROUTEID).to(finishEndpoint);
Run Code Online (Sandbox Code Playgroud)

我试着用

camelContext.stopRoute(TestRoute.ROUTEID);
Run Code Online (Sandbox Code Playgroud)

将旧端点更改为新端点

camelContext.startRoute(TestRoute.ROUTEID);
Run Code Online (Sandbox Code Playgroud)

但我的努力不能正常工作.

谢谢你的帮助

dynamic apache-camel endpoint

3
推荐指数
1
解决办法
4892
查看次数

Spring Embedded Server

我正在使用spring 3.0.2和ApacheDS 1.5.5,我正在尝试使用以下命令运行嵌入式服务器:

<ldap-server ldif="classpath:conf/users.ldif" port="39999"/>
Run Code Online (Sandbox Code Playgroud)

user.s.ldif文件的内容是:

dn: cn=The Postmaster,dc=example,dc=com
objectClass: organizationalRole
cn: The Postmaster
Run Code Online (Sandbox Code Playgroud)

但我总是得到这个错误:

16566 [main] INFO org.apache.directory.server.protocol.shared.store. LdifFileLoader - Could not create entry ClientEntry
dn: cn=The Postmaster,dc=example,dc=com
objectclass: organizationalRole
cn: The Postmaster

org.apache.directory.shared.ldap.exception.LdapNam eNotFoundException: Cannot find a partition for 2.5.4.3=the postmaster,0.9.2342.19200300.100.1.25=example,0.9.2342.19200300.100.1.25=com
at org.apache.directory.server.core.partition.DefaultPartitionNexus.getPartition(DefaultPartitionNexus. java:1082)
at org.apache.directory.server.core.partition.DefaultPartitionNexus.hasEntry(DefaultPartitionNexus.java :1037)
at org.apache.directory.server.core.interceptor.InterceptorChain$1.hasEntry(InterceptorChain.java:167)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java :1300)
at org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:159)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java :1300)
at org.apache.directory.server.core.interceptor.BaseInterceptor.hasEntry(BaseInterceptor.java:159)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.hasEntry(InterceptorChain.java :1300)
at org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:154)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1196 )
at org.apache.directory.server.core.referral.ReferralInterceptor.add(ReferralInterceptor.java:251)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1196 )
at org.apache.directory.server.core.authn.AuthenticationInterceptor.add(AuthenticationInterceptor.java: 212)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1196 …
Run Code Online (Sandbox Code Playgroud)

spring ldap spring-security apacheds

1
推荐指数
1
解决办法
3733
查看次数

您如何回应"没有时间测试/开发清洁代码,因为截止日期"这一论点?

好吧,我认为这个问题出在了错误的地方,我将前往https://softwareengineering.stackexchange.com/阅读/询问.谢谢大家到目前为止的答案.:)


道歉 ;)如果这个问题有点主观,我很抱歉,但我无法想出一个更好的头衔.如果你知道更好的事情,我会纠正它.

在我的组织中,关于整个自动化测试持续集成的事情有很多嗡嗡声,但我经常听到的一个论点是:

如果截止日期已经设定且只是我估计的一半,我应该如何开发好的,干净的,易于维护的代码并编写单元测试?

我自己是开发人员,所以我能理解这一点.但我总是试图回应,不仅开发人员需要范式转变,而且管理层也需要.

如果你是一名开发人员并且你的估计减少了一半,无论你估计什么,你都不会去任何地方,无论你的问题多么复杂或微不足道.你需要管理人员的备份,即那个给钱的One Guy.

结论?

你能给我一些帮助,可能是一个很好的URL来阅读这个开发/管理冲突,一本书或一个个人见解?您是否正在一家现在正在进行精益开发的瀑布公司中经历这样的大规模流程转移?或者你知道这个论点并且有一个聪明的答案吗?

请帮助我重命名或移动这个问题.:-)

更新

谢谢你们所有的答案!:)我想我必须明确表示,我的观点不是来自管理层的" 做两倍快 "的声明.这是关于开发人员发表此声明的负面观点.

我能做些什么来帮助人们理解这不是软件开发的默认设置吗?该PM不积极防范编写好的代码,也许双方都需要了解的干净的代码基础,良好的覆盖和大量的自动化测试的利弊/反政府多一点的教育?

testing coding-style organization

1
推荐指数
1
解决办法
266
查看次数

Excel VBA:复制另一个工作簿中的行,但只复制函数结果

我想将工作簿中的10行复制到新工作簿中.复制和粘贴很好,但在复制的单元格中有一些我需要用结果替换的公式.

有没有一种神奇的方法来复制细胞中显示的值?

这是我现在这样做的方式:

Rows("2:11").Select
Selection.Copy
myWorkbook.Sheets(1).Activate
ActiveSheet.Rows("1:10").Select
ActiveSheet.Paste
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba

0
推荐指数
1
解决办法
9866
查看次数